Command Manager

2 posts, 0 answers
  1. Xetick
    Xetick avatar
    10 posts
    Member since:
    Feb 2007

    Posted 29 Apr 2007 Link to this post

    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

  2. Dimitar Kapitanov
    Dimitar Kapitanov avatar
    632 posts

    Posted 02 May 2007 Link to this post

    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
Back to Top