How to add custom menu item to designer menu
Posted: Wed Jun 11, 2008 12:54 pm
While playing with the evaluation version in hiding certain menu options in the Designer, I see there is a way for me add a menu item.
When I try to do this, I get Object Reference Not Found error.
How do you add custom menu items? Here is my code:
StiConfig.Load()
StiMainMenuService menuSrv = StiConfig.Services.GetServices(typeof(StiMainMenuService)) as StiMainMenuService
menuSrv.AddMenuItem("Edit", "mnuTest", "Test Item", new EventHandler(this.mnuTest_Click));
When I try to do this, I get Object Reference Not Found error.
How do you add custom menu items? Here is my code:
StiConfig.Load()
StiMainMenuService menuSrv = StiConfig.Services.GetServices(typeof(StiMainMenuService)) as StiMainMenuService
menuSrv.AddMenuItem("Edit", "mnuTest", "Test Item", new EventHandler(this.mnuTest_Click));