How to implement a dynamic menu and toolbar?

Topics: CAB & Smart Client Software Factory
Nov 24, 2006 at 6:47 PM
originally posted by: ching100

In BankTeller sample, menuItems are dynamically loaded and created from the following XML section:

<add id="1" site="FileDropDown" label="E&xit" commandname="FileExit" key="Alt, F4" />
<add id="2" site="MainMenu" label="&Help" register="true" registrationsite="Help" />
<add id="3" site="Help" label="&About..." commandname="HelpAbout" key="F1" />

It is nice to go this way, but my first question is:
if my menuItem contains image, how to put the following line to XML:
myMenuItem.Image = Properties.Resources.NewFile;

The second question is: if new cab module is added and this module must extend the main menu, how to extend this XML file?
If the upper XML section in App.config must be modified, does it mean the whole Shell must be rebuilt?

Thanks for you answer in advance.
Nov 24, 2006 at 11:29 PM
originally posted by: hmoeller

For a comprehensive approach to a CAB XML mapper service, you might want to have a look at this: