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

Merging theme not working correctly

1 Answer 117 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Juraj
Top achievements
Rank 1
Juraj asked on 28 Nov 2019, 08:07 AM

Hello,

 

I merged themes in Application.Xaml like this

   <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/Telerik.Windows.Controls.xaml"/>
            <ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/Telerik.Windows.Controls.GridView.xaml"/>
            <ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/Telerik.Windows.Controls.FixedDocumentViewers.xaml"/>
            <ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/Telerik.Windows.Controls.Input.xaml"/>
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>

And this is working correctly, but as soon as I merge this file (which I need for my project) every ordinary button in my project merges this Expression dark theme (which I do not want).

<ResourceDictionary Source="/Telerik.Windows.Themes.Expression_Dark;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>

 

 I am aware that merging System.Windows with this theme changes button style but in this case it is not merged, and it still looks different.

So, two questions:

1.) How do I merge Telerik.Windows.Controls.Navigation with this Theme without merging ordinary buttons also with this theme?

2.) Is there any way I can merge this theme to System.Windows this but only to tooltips and scrollbars?

 

Thank you

 

1 Answer, 1 is accepted

Sort by
0
Juraj
Top achievements
Rank 1
answered on 28 Nov 2019, 11:48 AM

I managed to do what I wanted, here is a solution

Application.xaml.vb

Imports Telerik.Windows.Controls
 
Class Application
    Public Sub New()
        StyleManager.ApplicationTheme = New Expression_DarkTheme()
        InitializeComponent()
    End Sub
End Class

 

 

Application.xaml

<Application.Resources>
    <Style TargetType="ScrollBar">
        <Setter Property="telerik:StyleManager.Theme" Value="Expression_Dark"/>
    </Style>
    <Style TargetType="ToolTip">
        <Setter Property="telerik:StyleManager.Theme" Value="Expression_Dark"/>
    </Style>
</Application.Resources>
Tags
General Discussions
Asked by
Juraj
Top achievements
Rank 1
Answers by
Juraj
Top achievements
Rank 1
Share this question
or