RadRibbonView with a command defined INSIDE a ViewModel outside MODULE

2 posts, 0 answers
    VIHUCAR avatar
    2 posts
    Member since:
    Jul 2012

    Posted 29 Jul Link to this post

    Hi there.

    I'm trying with no success at the moment, to implement a simple PRISM application who uses a RadRibbonView. The complexity resides basically in the command being defined as a member of a ViewModel that belongs to a MODULE of this PRISM application:


    Prism application contains:


    Shell, with a RadRibbonView containing a RadRibbonButton with a command called AddNewEmployee

    EmployeeModule, with a RadGridView whose DataContext is EmployeeViewModel

    EmployeeViewModel, defines an AddNewEmployee command.

    So, AddNewEmployee command must be called on RadRibbonView, who knows nothing (pretty much like Jon Snow) of the model used in the EmployeeModule.


    p.s.: modules are being loaded using RadRibbonTabs, and in the first tab, theres the button who calls the AddNewEmployee command.

    Question is: this can be achieved? it is possible?




  2. Kiril Vandov
    Kiril Vandov avatar
    323 posts

    Posted 03 Aug Link to this post

    Hello Gonzalo,

    As you can define the prism modules in variables way I am not completely sure about the implementation of modules that you are using. Also the structured of the ViewModels and their links and commands. For instance your ViewModel could be hierarchical or flat and you could define the Command in the MainViewModel which can trigger the execution of the command in the EmployeeViewModel. You could also use a static command which could be accessed in the entire application and execute your custom logic.
    We will need more detailed information in order to provide you with the best possible solution for your scenario. That is why I would like to ask you to provide us with a sample project demonstrating your approach.

    Kind regards,
    Kiril Vandov
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft banner
Back to Top