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

Problem with NoXmal themes and Prism

2 Answers 84 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Nicholas
Top achievements
Rank 1
Nicholas asked on 24 Feb 2015, 10:43 AM
Hi

I'm trying to use the NoXmal binaries with Prism.

I have a region that contains the RadRibbonTab.  When I inject it into the RadRibbonView region nothing appears.

If I use the normal binaries everything works fine.

When using the NoXmal binaries, I can create a RadRibbonTab in the xmal file and it shows up.

This is the code for the RabRibbonTab view I'm adding to the region

<telerik:RadRibbonTab xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"<br>        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" <br>        x:Class="TelerikWpfApp1.Views.HomeRibbonView"<br>        xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.RibbonView"<br>        Header="Home"><br>    <telerik:RadRibbonGroup Header="Jobs"><br>        <telerik:RadRibbonButton Content="Job List" Command="{Binding OpenJobListCommand}" /><br>    </telerik:RadRibbonGroup><br>    <telerik:RadRibbonGroup Header="Data"><br>        <telerik:RadRibbonButton Content="Sync Data" Command="{Binding OpenSyncViewCommand}" /><br>    </telerik:RadRibbonGroup><br></telerik:RadRibbonTab>


Any ideas?

Thanks

Nick

2 Answers, 1 is accepted

Sort by
0
Kiril Vandov
Telerik team
answered on 24 Feb 2015, 11:13 AM
Hello Nick,

The Implicit Style can not be applied to derived controls as their TargetType is different than the one defined in the Implicit Style. If you set the style implicitly, the style is applied only to the types that match the TargetType exactly and not to elements derived from the TargetType value. You can find more information on the topic in the remarks of the Style property definition.

This is why in order to apply a Telerik predefined style on a UserControl deriving from RadRibbonTab, you  need to add a Style targeting the UserControl type in the Resources of the application. It is best to define that style after merging the Telerik ResourseDictionaries so that you can base the UserControl Style on the predefined "RadRibbonTabStyle".

Another approach is to add the style directly to the modules of your RadRibbonTabs, like follows:

<telerik:RadRibbonTab x:Class="TestApplication.RibbonTab1"
      Style="{StaticResource RadRibbonTabStyle}"
...

I hope this information helps.


Kind regards,
Kiril Vandov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Nicholas
Top achievements
Rank 1
answered on 24 Feb 2015, 04:57 PM
Hi

Thank you for your reply.  I'm still quite new to WPF so still learning the styling side of things.

I've used you final option of adding directly to the module, and it's now working.

The reason for the change to the NoXmal was a conflict when using the RadTab and the RadRibbonView, which has now been resolved.

Many thanks

Nick
Tags
RibbonView and RibbonWindow
Asked by
Nicholas
Top achievements
Rank 1
Answers by
Kiril Vandov
Telerik team
Nicholas
Top achievements
Rank 1
Share this question
or