This is a migrated thread and some comments may be shown as answers.

Command Manager

1 Answer 22 Views
This is a migrated thread and some comments may be shown as answers.
Xetick
Top achievements
Rank 1
Xetick asked on 29 Apr 2007, 11:33 AM
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

1 Answer, 1 is accepted

Sort by
0
Dimitar Kapitanov
Telerik team
answered on 02 May 2007, 11:46 AM
Hi Joakim Eriksson,
We will be discussing your idea in a short time. We will evaluate whether we should change the Shortcuts component functionality or develop a new one. We have implemented the command pattern very similar to the implementation in WPF, regarding the component scope commands and we didn't provide an application level implementation on purpose as it is out of our components scope. We have a dual implementation - standalone Shortcuts component (not preferred to be used in simple scenarios) and internal implementation inside RadControl exposed through the CommandBindings property. Please take a look and suggest if this implementation suits your goals.

Sincerely yours,
Dimitar Kapitanov
the telerik team

Instantly find answers to your questions at the new Telerik Support Center
Asked by
Xetick
Top achievements
Rank 1
Answers by
Dimitar Kapitanov
Telerik team
Share this question
or