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 disable three of the four menu items from the Docking Manager Context Menu

Thread ID:

Created:

Updated:

Platform:

Replies:

55454 Jan 30,2007 11:14 AM Jan 31,2007 08:15 AM Windows Forms 2
loading
Tags: Tools
Himanshu
Asked On January 30, 2007 11:14 AM

Hi,

We are using a Docking Manager as implemented in the SDI Demo.

When we right click on the Docking Manager panel, we get the following four context menu items:

Hide
Floating
DockTo
AutoHide

The point is: We do not need the last theree Context Menu items , namely Floating,DockTo and AutoHide.However, we do need the Hide ContextMenu with the associated functionality.How do we go about this?

Any suggestion would be greatly appreciated.

Thanks & Regards,
Himanshu

Gopalakrishnan S [Syncfusion]
Replied On January 30, 2007 04:05 PM

Hi Himanshu,

Thanks for using Syncfusion products.

You can use DockContextMenu event of docking manager for hiding the ContextMenu items.

Here is the code snippet:

this.dockingManager1.DockContextMenu += new Syncfusion.Windows.Forms.Tools.DockContextMenuEventHandler(this.dockingManager1_DockContextMenu);

private void dockingManager1_DockContextMenu(object sender, DockContextMenuEventArgs arg)
{
arg.ContextMenu.ParentBarItem.Items[0].Visible = false;
arg.ContextMenu.ParentBarItem.Items[1].Visible = false;
arg.ContextMenu.ParentBarItem.Items[2].Visible = false;
arg.ContextMenu.ParentBarItem.Items[3].Visible = false;
}


Please let me know if this helps.

Regards,
S.Gopal.

Himanshu
Replied On January 31, 2007 08:15 AM

Hi Gopal,

Thanks for the prompt reply.

Yes it worked exactly as desired.

Thanks again for the assistance.

Regards,
Himanshu


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.

;