Appendix A. Generating Menu Names

The following code, run from an add-in, gives you a list of all the menus you can attach your menu items to:

image

This code generates a list of the context menus in the Project and Context menus (these are the context menus you are most likely to want to add your own menu items to):

image

Get Practical Code Generation in .NET: Covering Visual Studio 2005, 2008, and 2010 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.