How to remove DockSite context menu items "Float" and "Dock" in Tabbed Docing

Docking/MDI for WPF Forum

Posted 5 years ago by Ruslan Fedoseienko
Version: 14.1.0602
Avatar

Hi. Couldn't find the way to remove context menu items "Float" and "Dock" in Tabbed Docking.

Of cource I can remove them directly in DockSite.WindowContextMenu Handler but this looks not a right way as for me.

Can anyone suggest the right way?

[Modified 5 years ago]

Comments (3)

Posted 5 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Ruslan,

If you want to control enabled states of those menu items globally or for specific instances of docking windows, you can alter the various CanXX properties (e.g. DockSite.CanDocumentWindowsRaft, etc.) that govern the related behavior.

However to completely remove the menu items, you would need to handle the WindowContextMenu event and modify the e.ContextMenu.Items collection there.


Actipro Software Support

Posted 3 years ago by Hardgrafter83
Avatar

Hi, trying to acheive this in more recent release (16.1.635). Don't seem to have the WindowContextMenu event on the DockSite so assume there's another approach to acheive this?

 

Thanks,

Tom

[Modified 3 years ago]

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

The older v2015.1 and earlier API had a DockSite.WindowContextMenu event, and it was changed to DockSite.MenuOpening in the major v2016.1 updates.  The event args are slightly different but the same concepts apply.  You can see details on all breaking changes for the 2016.1 version in the Docking/MDI's documentation under the "Converting to 2016.1" topic.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.