(Trial DLL included)
.NET 4 / Silverlight 4
|Visual Studio version
VS 2010 (Any version)
C# / Xaml
all browsers supported by RadControls
A sample project showing how to use the RadRibbonBar as a PRISM region and the RadRibbonTab as nested region
The goal of this project was describe in this forum thread
and was to be able to inject the menu of each module inside a RadRibbonBar using the power of PRISM adapter so all modules never know that the shell use a RadRibbonBar. This allow you to change the shell structure at anytime without to change any module.
To do that we will create a custom (standard clr object) structure to hold all information we need to build the menu:
It contains the name of the module and a list of group.
This class will be converted to a RadRibbonBar.
It contains the name of the group and a list of actions.
This class will be converted to a RadRibbonTab
it contains the name, icon and command of the actions and also a list of sub actions
This class will be converted to a RadRibbonButton or a RadRibbonSplitButton if at least one sub action is defined
The solution contains 4 project:
used as PRISM Shell and contains the PRISM adapters.
contains the class ModuleDefinition, GroupDefinition, ActionDefinition
define a Module with one group and one action
define a module with one group and one action that contains 2 sub action and also a group with one action in the nested region of the module A.
The code provided in this sample project is not ready to be used in production and you should be reviewed to add some error validation.