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
960
Using ContextMenu with XamMenu
posted

Hi, I have a question about the Context Menu.

I have a window with a XamMenu inside, and coming from Windows Forms I usually create a Context Menu indicating which menu item of the Toolbars Manager to use on each control in the window.

Now looking at the WPF version of the Context menu it seems that I have to rewrite a new Context menu...

It is not a problem, I just wanted to know

a) Is this correct? Do I have to define the whole ContextMenuService, ContextMenuManager, etc. for each control with a context menu.

b) If I have two different menus for two different controls is there any problem with using two different Context Menus?

c) If I have two controls in different positions on the window and want to give them the same context menu, do I have to duplicate it for each control or can I define it once and assign to more controls? (given that the controls are not in a common container so I cannot put the menu in the container)

The samples on the samples browser show all just one context menu on a single control, so this is not clear.