views:

60

answers:

1

I would like to use MainMenu and ContextMenu in my WinForms app, and put icons next to some of the menu items. But MenuItem doesn't have any way to specify an icon.

It would be easy to add one with owner-draw, but then my menu looks owner-drawn -- I lose all of the default drawing from the XP/Vista theme.

What's the best way to get icons on a MainMenu (or ContextMenu) and still play nice with theming?

I'm not specifically attached to MainMenu; I'm also open to third-party menu replacements (including commercial ones), as long as they're high-quality and support hiding menu items at runtime. I am not open to MenuStrip because it satisfies neither of those criteria (see e.g. this bug that Microsoft refuses to fix).

A: 

Just select an item in the MainMenu and assign the "Image" property to a resource file. VS 2010 allows that now.

jitbit