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

Explicit styles in custom theme

1 Answer 57 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ross
Top achievements
Rank 1
Ross asked on 19 Oct 2011, 06:06 PM
I've created a custom theme using the 'Telerik approach' that is laid out in the documentation. This works great for implicit theming of the controls, but if I want to include explicit styles (styles with a x:Key) is that possible? I would really like to have these styles included in a compiled assembly.

Thanks,
Ross

1 Answer, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 20 Oct 2011, 01:11 PM
Hi Ross,

Basically, a style would override any theme applied to the control, regardless of whether the style is explicit or implicit. But what you can do is try basing your style on your custom theme.

Please, consider the following xaml snippet in App.xaml:

<Application
    x:Class="SilverlightApplication3.App"
    xmlns:local="clr-namespace:SilverlightApplication3">
    <Application.Resources>     
        <local:CustomTheme x:Key="Theme" />     
        <Style x:Key="MyCustomButtonStyle" TargetType="telerik:RadButton" telerik:StyleManager.BasedOn="{StaticResource Theme}" />
          
    </Application.Resources>
</Application>

I hope this will help you achieve your goal. If you need further assistance on theming, please let me know.


All the best,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
General Discussions
Asked by
Ross
Top achievements
Rank 1
Answers by
Dani
Telerik team
Share this question
or