Thomas,
There are essentially three ways to go:
-
Use the ConstructContextualMenu / ContextualMenuAction event handlers to build the menu and respond to selections, but this (as the name implies) only works for “ontextualy generated” (right click, etc.) menus. This is likely the most compatible solution since it handles all the ways that contextual menus can be evoked, but might not be what you want.
-
Create a menu programmatically when the user clicks the object. This is a bit more difficult since you have to use the “AddHandler” method to handle the menu events, but this is probably the most OO way to go.
-
Create a menu bar menu that is set to not visible. Then use the mnuMyMenu.Popup method to get it to popup wherever you want.
Hope this helps.