[.net] Context Menu Images
What ways are there for me to put images next to the text in my context menus in C# 2005? Is it even possible?
The "standard" way is to OwnerDraw your own derived MenuItem. Since that's nasty and requires a lot of individual drawing operations, the cleaner but slightly more complicated solution is to use an IExtenderProvider, as shown here and here. Additionally, you could also use a third-party menu control. There are many cheap (< $100) GUI object suites out there, if you're working on a minimal budget. Or if you're on a big project, there's the big names like Infragistics and Syncfusion.
Thanks that helped me a lot! Another question though, what about using the ContextMenuStrip control instead?
The new *MenuStrip controls in .NET 2.0 let you add images, and are more powerful than the old menu controls.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement