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.
Unfortunately, activation email could not send to your email. Please try again.

How to display separator in CustomContextMenu of DockingManager

 

As per current implementation of DockingManager’s CustomContextMenu there is no direct support to add separator as like in Menu control. But this can be achieved by customizing the MenuItem style of the CustomContextMenu with help of IsSeparator property of SeparatorExt class. If the attached property "IsSeparator" is true, separator will be displayed instead of header. Below code snippets are demonstrate the same,

DockWindowMenuItemStyle:

 

DocumentWindowMenuItemStyle:

 

MainWindow.xaml

 

SeparatorExt.cs

 

Screenshot:

 

 

Article ID: Published Date: Last Revised Date: Platform: Control:
8230 12/14/2017 12/14/2017 WPF DockingManager
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.