Does an implict theme apply to a microsoft window?

1 Answer 61 Views
Window
Will
Top achievements
Rank 1
Iron
Will asked on 13 Jan 2023, 12:54 AM
Does an implict theme apply to a System.Windows.Window? I'm setting a dark variant to my theme and the System.Windows.Window is all white.

1 Answer, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 13 Jan 2023, 10:40 AM

Hi Will,

Telerik doesn't have custom styles that change the appearance of the native WPF Window when you change the Telerik theme. To get the desired effect, you can use RadWindow. 

In order to support the Telerik theme change properly, I would recommend you to use the NoXaml approach described in the help documentation. In that case you can see the following article which shows how to change the theme at runtime. Also, when you change the color variation of the theme, you will need to remerge the Telerik resources, as shown here. Otherwise, some visual glitches may appear.

I hope this information helps. In case you need any further assistance, please let me know.

Regards,
Martin Ivanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Will
Top achievements
Rank 1
Iron
commented on 17 Jan 2023, 09:42 PM

Quick follow up. I've used the Prism sample project created for assisting a user for setting up theme with Prism. I am curious if two things can be modified in that project:

  • Can the bootstrapper be skipped by returning null in the CreateShell method then registering the RadWindow in the containerRegistry?
  • Can the MergedDictionary be placed in the App.xaml.cs instead?
Martin Ivanov
Telerik team
commented on 18 Jan 2023, 01:55 PM

(1) I am not that familiar with PRISM, but something similar is discussed here: https://stackoverflow.com/questions/54333568/prism-7-using-prismapplication-createshell-with-a-non-window-control

(2) Yes, you can merge the dictionaries in the code-behind file of the App class. You can see how to merge resources in code here: https://docs.telerik.com/devtools/wpf/styling-and-appearance/how-to/styling-apperance-themes-runtime

 

Tags
Window
Asked by
Will
Top achievements
Rank 1
Iron
Answers by
Martin Ivanov
Telerik team
Share this question
or