Jesper Niedermann's .NET Blog
about .NET and related technologies RSS 2.0
# Sunday, 13 June 2010

Imagine that you want to make an extension for Visual Studio 2010 that creates new custom right click menus for the Solution Explorer. Imagine that you could do it by just implementing a good old .NET interface like this:

public class MenuManager : IMenuManager
{
public IEnumerable<IMenuItem> GetMenus(ContextLevels menuForLevel)
{
var menuItems = new List<IMenuItem>();
var menuItem1 = new MenuItem("My Menu1");
menuItems.Add(menuItem1);
var menuItem2 = new MenuItem("My Menu2");
menuItems.Add(menuItem2);
return menuItems;
}

public string MainMenu()
{
return "My Main Menu";
}
}

 

Well it turns out you can. In MME I have helped you do exactly that. No more using the convoluted add-in model of Visual Studio to accomplish this goal. And it is also much simpler than using GAX/GAT (that can do so much more to be fair).

You can easily install MME, either by downloading directly from Codeplex or by installing directly from the Extension Manager in Visual Studio 2010 (you can find it under the Tools menu).

MME does not work for the Express editions of VS.

I also recommend installing the MME MenuManager template which you can also find in the Extension Manager.

At codeplex you can read more about implementing and deploying MME’s and also get further insight on the architecture.

Sunday, 13 June 2010 18:20:02 (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
Tools | Visual Studio
Comments are closed.
Archive
<2017 October>
SunMonTueWedThuFriSat
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234
About the author/Disclaimer
I am a software architect with focus on Microsoft Technologies. I have been working with these in different large companies since 1995. I am currently employed at UVdata A/S.
Here is my View Jesper Niedermann's profile on LinkedIn

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Privacy policy
The privacy policy of this site.

© Copyright 2017
Jesper Niedermann
Sign In
Statistics
Total Posts: 28
This Year: 0
This Month: 0
This Week: 0
Comments: 32
All Content © 2017, Jesper Niedermann
DasBlog theme 'Niedermann' created by Jesper Niedermann, based on 'Business' created by Christoph De Baene (delarou)