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

RadRibbonView with a command defined INSIDE a ViewModel outside MODULE

1 Answer 65 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
VIHUCAR
Top achievements
Rank 2
VIHUCAR asked on 29 Jul 2016, 05:48 PM

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?

regards,

 

Gonzalo.

1 Answer, 1 is accepted

Sort by
0
Kiril Vandov
Telerik team
answered on 03 Aug 2016, 07:22 AM
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.
Tags
RibbonView and RibbonWindow
Asked by
VIHUCAR
Top achievements
Rank 2
Answers by
Kiril Vandov
Telerik team
Share this question
or