Lock toolwindow order

Docking/MDI for WPF Forum

Posted 13 years ago by Bjørnar Sundsbø - Norway
Version: 10.2.0533
Avatar
I want to allow my toolwindows to be rafted/floating, however, I do not wish to be able to change the order of toolwindow tabs using the drag drop approach. At least I want to be able to lock the order so users won't accidentally move toolwindows within the same container. This is to avoid confusion and the user always know where the toolwindow can be found (without having a restore button).

Also, when rafting, and then docking back to the "original" container (yes, I know containers and toolwindows and such are created and destroyed when moved),I would like it to go back to its original location, and not at the end, if possible.

Any suggestions?

[Modified at 01/11/2011 01:02 PM]


Bjørnar Sundsbø

Comments (3)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Bjørnar,

I'm not sure if what you are asking is possible. You may try the DockSite.CanToolWindowsDrag and/or CanToolWindowTabsDrag options.

Aside from that, I don't think you can fix the items in a ToolWindowContainer. You may also need to set ToolWindowContainer.CanAttach to false to prevent other windows from being added.


Actipro Software Support

Posted 13 years ago by Bjørnar Sundsbø - Norway
Avatar
I will try CanToolWindowsDrag and CanToolWindowTabsDrag. I do wish to be able to move toolwindows from docked state or to a different container using drag and drop, though I do not wish to change their order. Pretty much the same as AllowColumnsReorder for a ListView's GridView, but still be able to move a column from one listview to another. Not sure if that scenario makes any sense or not, but there it is. I might be able to hook into the DockSite.WindowDragging and/or DockSite.WindowDragged and cancel the operation if source and target is the same. Maybe...


Bjørnar Sundsbø

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Bjørnar,

Sounds like you'd need more than just a "AllowColumnsReorder" option. If you had a container with TW1, TW2, and TW3, then you could detach TW1 and reattach it (which would put it at the end). So really, you'd need to control the sort order of the items, which could get tricky.

I've added TODO items for both these feature requests, but we'd need to flush out how the "sorting" would work first.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.