We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to remove the menu item from docked window context menu in DockingManager?

Platform: WinForms |
Control: DockingManager |
Published Date: April 30, 2018 |
Last Revised Date: April 30, 2018

Context menu items in dock window caption can be customized using DockContextMenu event of DockingManager. The DockContextMenuEventArgs allows to add/remove the menu items using its ContextMenu option.  So, we can add/remove the ContextMenuItem by passing the corresponding BarItem to add/remove function.

 

Here we have added the new menu item "File" and removed the default menu items “Hide” and “Dock to”.  Please make use of the below ContextMenuItemText for remove the default menu items from context menu. 

 

ContextMenuItem

Corresponding BarItem Text

Floating

Dockable

MDI Child

Auto-Hide

Hide

Dock to

&Floating

Doc&kable

&MDI Child

&Auto-Hide

&Hide

Dock to

 

The following code demonstrates the same.

 

Code Example: [C#]

 

 

 

Screenshot

 

Figure: Default ContextMenu

 

Figure: After add/remove ContextMenuItem.

 

Sample:

 

C#:  DockingManagerExample

 

VB:  DockingManagerExample

 

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon