With the current implementation of the RadRibbonView control the ContextualGroups are not fully supported in MVVM scenarios. Hence, you are not able to create them entirely in code.
However, there is a way to visualize those groups even in MVVM scenarios. But you need to have in mind that there are restrictions that you need to pay attention to. Let me first explain the approach to visualize the groups.
You can define and set the properties of the groups in XAML. Next, in the ViewModel of the tabs you can define a property that will hold the name of the group that the corresponding tab will be visualized in. Furthermore, you can define a Style targeting the RadRibbonTab and bind its ContextualGroupName property to the property defined in your TabViewModel.
For your convenience I prepared a solution demonstrating an MVVM approach using the RadRibbonView control. Please take a look at it and let me know if you need any further assistance.
Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely. Sign up for Free application insights >>