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

Theme only apply to controls and not the Window?

3 Answers 8 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rob A.
Top achievements
Rank 2
Iron
Iron
Veteran
Rob A. asked on 26 Oct 2020, 05:15 PM

It seems when I set a theme globally (using Implicit) and new Window I show doesn't have the theme applied to the actual Window ... like Title bar color, font, windows background ... they all seem to inherit default and not my assigned theme (i.e. GreenTheme).  The telerik controls on the Window do indeed use my assigned theme.

Does Telerik UI WPF suite provide an alternative or is this a bug?

Cheers, Rob.

3 Answers, 1 is accepted

Sort by
0
Vicky
Telerik team
answered on 27 Oct 2020, 08:22 AM

Hello Rob,

When using the RadWindow control with NoXAML (implicit styles), you need to define the following style after the merged dictionaries to make it receive the RadWindowStyle (as it does not automatically):

<Application.Resources> 
    <ResourceDictionary> 
        <ResourceDictionary.MergedDictionaries> 
            <ResourceDictionary Source="/Telerik.Windows.Themes.Green;component/themes/System.Windows.xaml" />
            <ResourceDictionary Source="/Telerik.Windows.Themes.Green;component/themes/Telerik.Windows.Controls.xaml" />
            <ResourceDictionary Source="/Telerik.Windows.Themes.Green;component/themes/Telerik.Windows.Controls.Navigation.xaml" />
        </ResourceDictionary.MergedDictionaries> 
        <Style TargetType="local:MainWindow" BasedOn="{StaticResource RadWindowStyle}" /> 
    </ResourceDictionary> 
</Application.Resources> 

Please, try it out and let me know if it helps.

Best Regards,
Vicky
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Rob A.
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 29 Oct 2020, 10:48 PM

I was able to get this working without using the XAML you listed above.  I used the process outline here

Cheers, Rob.

0
Vicky
Telerik team
answered on 02 Nov 2020, 07:18 AM

Hello Rob,

I am glad that you managed to achieve the desired result.
I remain at your disposal in case any further questions arise.

Best regards,
Vicky
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Rob A.
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Vicky
Telerik team
Rob A.
Top achievements
Rank 2
Iron
Iron
Veteran
Share this question
or