How to disable "New Horizontal Tab Group" in context menu?

Docking/MDI for WPF Forum

Posted 8 years ago by Andreas Hellström
Version: 11.1.0545
Avatar
Hello!

I want to disable "New Horizontal Tab Group" and "New Vertical Tab Group" in the context menu. I searched the forums and found this post ("ContextMenu on Document Tab"), but I don't really know how to follow the advice given there: "...update what will show".

Is there an easier way to disable (just) these options (and not the whole context menu)?

Thanks!

Comments (1)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Andreas,

There is an event on the DockSite control called WindowContextMenu, which is raised before any built-in menus are displayed by the DockSite or is related controls. This event includes the ContextMenu that will be displayed as part of it's event arguments. So if you handle this event, you can remove those two MenuItems from the ContextMenu.Items collection or disable them. You can even add your own items, if needed.


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.