disconect between code and documentation(part2)?

Topics: CAB & Smart Client Software Factory
Jul 21, 2006 at 9:58 AM
originally posted by: y2k4life

Adding a Service ms-help://MS.VSCC.v80/MS.VSIPCC.v80/ms.practices.2005Nov.cab/CAB/html/03-020-Adding%20Services.htm
Showing UIElements ms-help://MS.VSCC.v80/MS.VSIPCC.v80/ms.practices.2005Nov.cab/CAB/html/03-100-Showing%20UIElements.htm
Then add some like
How to show your view in the Shell?

And then this is where I just get totally lost.

I open the ModuleController.cs and see the various functions that are called to extend the menu with a help link (that should be in the help after building the view):
There is one to ExtendMenu() ms-help://MS.VSCC.v80/MS.VSIPCC.v80/ms.practices.2005Nov.cab/CAB/html/03-100-Showing%20UIElements.htm
I click that and up comes the help.

Call the RegisterSite method of the UIExtensionSites collection of the root WorkItem, passing the site name for the element and the control where it will be located. You need only do this once to register the site. Afterwards, you can add multiple elements to the site by repeating steps 2, 3, and 4.

1. Where do I put this the code the help does not say? This would be if I wanted to register a new UIExtensionSite like a different toolbar. Ok that is not what I need to do, but if it was the instructions do not tell me to go back to ShellLayoutViewPresenter.cs as an example. Furthermore if this is what I wanted to do the code would not work with where I place it. I see that this would go in the OnViewSet() method of ShellLayoutViewPresenter.cs. But if I where to paste the code in "RootWorkItem.UIExtensionSites.RegisterSite("MainMenu", Shell.MainMenuStrip);" it does not work and does not match the existing code. I know regardless that I would need make some change so that it would add my menu and give it a key that I provide like SecondaryMenu, Shell.SecondaryMenu . But in addition I would nee to change it to WorkItem.UIExtensionSites.RegisterSite...... From RootWorkItem. The documentation assumes that the one using it know what there doing. They don't that is why I'm looking at help that does not help.


In the AfterShellCreated method of your class that inherits from FormShellApplication, declare a local variable of the type of element to display on the control as shown in the following code.

1. Then the instructions continue to tell me to modify another file not relating to the ModuleController.cs. Ok I clicked a link in ModuleController.cs but I'm given instruction on modify two files that have nothing to do with this file. If I do what they tell me to do and do it where they tell me to do it will not work.