Prevent Rafted ToolWindow Top position going negative

Docking/MDI for WPF Forum

Posted 14 years ago by Jim Strav
Version: 9.2.0514
Avatar
I am using hosted, rafted ToolWindows. They can be dragged up into the tabbed document area which is actually a negative Top position. Is there anyway to limit the drag to stop at the 0 position? I can snap the rafted window back to 0 after the fact, but I would rather it stop at the 0 position.

What I am really trying to do is code an EnsureVisible function for the tool window that I will call when reloading a document. The problem is, if the user left it at the -10 position, I always snap it back to 0 because I don't really know the negative limit before a tool window is off the screen, so I am forced to use the 0 position as my threshold.

This results in a strange experience because the user is allowed to drag it negative but then I snap it back thinking it is off the screen, even though the negative position is perfectly visible.

Comments (3)

Posted 14 years ago by Jim Strav
Avatar
I can do hit test and figure out if it is showing, but again, I would really rather the tool window not be allowed to go to a negative top position.
Posted 14 years ago by Jim Strav
Avatar
I see now that the rafted windows are allowed to go anywhere in the main Window. So my real question now becomes, can I contain the hosted rafting windows within their DockSite, rather then letting them move anywhere in the main Window?
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Jimmy,

One problem we have known about and have resolved for the next build is that "hosted" rafting windows were allowed to be dragged off of visible area. So if one was dropped outside of the visible area, it couldn't be retrieved by the end user unless they somehow hid and showed it again.

Our code update for the next build gives a new property that allows you to say what the "container" for the hosted window should be. Our code will restrict the rafting window dragging to keep the rafting window's title bar within that container, completely for title bar height, and up to a portion of the title bar width.

You had mentioned wanting to keep a rafting window completely within the DockSite bounds. This isn't exactly what you wanted since there can be some overhang, but what we did will certainly help and prevent rafting windows from being dragged to a place they can't be used any more.


Actipro Software Support

The latest build of this product (v24.1.2) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.