Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
XAMDockManager disable /hide Header panel and context menu
posted

I would like to disable few context menu from ContentPane header & Pinned TabGroupPane. How do I go about with this?

Pinned ContentPane Hide Menu

Header context Menu

Hide/Disable New Horizontal Tab Group & New Vertical Tab Group menu

Parents
  • 29130
    Offline posted

    Hello Prashanth,

    I have been investigating into your requirement in this case, and from the screenshots you have provided, my impression of what you are looking to achieve is that you wish to only allow Dockable, Tabbed Document, and Auto Hide menu items for your ContentPanes that are not in the DocumentContentHost. In the DocumentContentHost, you wish to do the above, as well as hiding the New Horizontal Tab Group and New Vertical Tab Group options. If this is not the case and my impression is incorrect in any way, please let me know, as the following is based on this impression.

    You can do this by using a Style for ContentPane, setting AllowFloatingOnly and AllowClose to “false.” This will achieve your first two requirements.

    In order to achieve the removal of the “tab group” setting, I would recommend handling the ContentPane.OptionsMenuOpening event. The event arguments of this event will net you the menu items, and if you check the ContentPane.PaneLocation for Document first and call e.Items.RemoveAt(e.Items.Count – 1) three times (where ‘e’ is the event arguments) you can achieve your requirement.

    I am attaching a sample project to demonstrate the above. I hope this helps you.

    Please let me know if you have any other questions or concerns on this matter.

    XamDockManagerContextMenuModDemo.zip

Reply Children
No Data