Uwe Zimmermann
Top achievements
Rank 1
Uwe Zimmermann
asked on 26 Oct 2014, 06:09 PM
I'm using RadWindow as main window of a wpf application. Switching theme of all other controls at runtime using implicit styling approach works great. But i can't switch theme of main window?!? Is there any way to get this working?
5 Answers, 1 is accepted
0
Hi Uwe,
In order to get the Style changing correctly of RadWindow used as MainWindow you would need to merge the following Style each time the theme is switched:
Or alternately you could set the Style property of the MainWindow the follow way:
This way the MainWindow will be receiving the correct Style once the theme is switched.
Hope this helps.
Regards,
Kalin
Telerik
In order to get the Style changing correctly of RadWindow used as MainWindow you would need to merge the following Style each time the theme is switched:
<
Style
TargetType
=
"local:MainWindow"
BasedOn
=
"{StaticResource RadWindowStyle}"
/>
Or alternately you could set the Style property of the MainWindow the follow way:
Style="{DynamicResource RadWindowStyle}"
This way the MainWindow will be receiving the correct Style once the theme is switched.
Hope this helps.
Regards,
Kalin
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
Uwe Zimmermann
Top achievements
Rank 1
answered on 27 Oct 2014, 11:49 AM
Hi Kalin,
thanks for your answer.
Your second approach does not work (window will be transparent).
Merging the style (your first approach) i tryed before i started this thread, but eventually i did something wrong. Could you give me some code showing how to merge the style correctly?
thanks for your answer.
Your second approach does not work (window will be transparent).
Merging the style (your first approach) i tryed before i started this thread, but eventually i did something wrong. Could you give me some code showing how to merge the style correctly?
0
Hi Uwe,
The approach with the DynamicResource should work as well. However I'm attaching a sample project, demonstrating the first approach I suggested you in my previous post.
Hope this helps.
Regards,
Kalin
Telerik
The approach with the DynamicResource should work as well. However I'm attaching a sample project, demonstrating the first approach I suggested you in my previous post.
Hope this helps.
Regards,
Kalin
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
Uwe Zimmermann
Top achievements
Rank 1
answered on 27 Oct 2014, 05:42 PM
Hi Kalin,
thanks for your sample project. It works like a charm.
thanks for your sample project. It works like a charm.
0
Hi Uwe,
I'm glad it helped. If you have any other questions, let us know.
Regards,
Kalin
Telerik
I'm glad it helped. If you have any other questions, let us know.
Regards,
Kalin
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.