Category / Section
How to hide desired menu items from Context Menu in DockingManager ?
1 min read
In DockingManager, the ContextMenu items can be hidden by using CollapseDefaultContextMenuItems property. For example, ContextMenu has five menu items (Floating, Dockable, Tabbed, Auto Hide, and Hide) as default. Now, Tabbed menu item can be hidden by setting ShowTabbedMenuItem to False in XAML or by its Name as Child3 in Code behind with the help of SetShowTabbedMenuItem method.
XAML
<syncfusion:DockingManager UseDocumentContainer="True"> <ContentControl Name="child1" syncfusion:DockingManager.Header="Dock1"> </ContentControl> <ContentControl Name="child2" syncfusion:DockingManager.Header="Dock2"></ContentControl> <ContentControl Name="child3" syncfusion:DockingManager.Header="Dock3" syncfusion:DockingManager.ShowTabbedMenuItem="False" > </ContentControl> </syncfusion:DockingManager>
C#
DockingManager.SetShowTabbedMenuItem(child3, false);
The following screenshot displays the hidden tabbed menu item on child3.