The control would allow you to define commands.
Like "Quit", "Save file", "Save all" and so forth.
The definition would contain everything you need for a command. It's event callback, toolstrip icon, tooltip text, short cut key and so forth.
The main goal of this would then be that you could then use these commands from anywhere. Like to add a "Save all" entry in the main menu you would just point to the command managers "Save all" entry and be done with it.
If you want the same functionality in a context menu or on a tool strip you would just point to the same command manager and the same command.
Change anything in that command and all places will be updated with the new icon, text or whatever.
The idea would be to get rid of the double definition of commands. If worst comes to worst you define the same icon, text and event callback in 3 diffrent places. (Menu, Context menu, Tool strip)
Using such a system the user would also be allowed to define his own toolstrips and menu choices, if he so wished because we would have a global pool of commands the user could use.
All this is featured in the excellent prof-uis package that I sadly had to leave behind because it's MFC & C++ only
Prof-Uis customizations
Command Manager
Like "Quit", "Save file", "Save all" and so forth.
The definition would contain everything you need for a command. It's event callback, toolstrip icon, tooltip text, short cut key and so forth.
The main goal of this would then be that you could then use these commands from anywhere. Like to add a "Save all" entry in the main menu you would just point to the command managers "Save all" entry and be done with it.
If you want the same functionality in a context menu or on a tool strip you would just point to the same command manager and the same command.
Change anything in that command and all places will be updated with the new icon, text or whatever.
The idea would be to get rid of the double definition of commands. If worst comes to worst you define the same icon, text and event callback in 3 diffrent places. (Menu, Context menu, Tool strip)
Using such a system the user would also be allowed to define his own toolstrips and menu choices, if he so wished because we would have a global pool of commands the user could use.
All this is featured in the excellent prof-uis package that I sadly had to leave behind because it's MFC & C++ only
Prof-Uis customizations
Command Manager