Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
695
Restrict a floating content pane movement
posted

Is it possible to restrict a floating content pane movement to a particular section of the screen?

Parents
  • 54937
    Offline posted

    Yes and no. During a drag operation of a dockable pane, the PageDragOver event will be raised as the floating window is being moved with a DragAction of MoveWindowAction so you could cancel that for points you consider invalid but if you move a FloatingOnly pane it is not participating in the docking and therefore doesn't raise the dragging events. Also, a user could resize the window such that it might go into an area you are trying to keep the pane out of. You may be able to change the Top/Left properties of the ToolWindow (or the FloatingLocation of the root splitpane) but that would after the fact and could result in some jumpiness or even some other issues since you could be fighting with the Window's attempt to position itself during a drag. May I ask what it is that you are trying to implement?

Reply Children