Customizing Context Menus
I have a context menu I would like to update: It's the
Table context menu, used when you right-click a table in the server explorer under a database.
Unfortunately, there are other commands named table.
How do I manipulate this menu?
| |
Command tablecommand = commands.AddNamedCommand(... ); CommandBar tablecommandBar = (CommandBar)commandBars["Table"]; CommandBarControl tableControl = tablecommand.AddControl(tablecommandBar, 1);
|
The above does not work.Thanks!
Unfortunately, there can be multiple context menus with the same name. I looked at all the top-rooted context menus, and I could only find one named Table, but depending on your configuration, there could be others. The only possible way of working around this is to look at the controls on the context menu, and search for a control that you know will exist on the menu you are looking for.
Craig