开发者

How to get the corresponding WPF theme with the current Windows theme?

Let's say in my application, there are two regions: 1) used customized theme, and 2) used the system theme (the 开发者_StackOverflow社区theme selected by the user in his Windows OS). Region 1 uses the customized themes whilst Region 2 uses the default themes.

The official default WPF themes can be downloaded here. What I need is to know the current theme that the wPF Presntation Library has applied to my default controls - so that I can activate it at runtime for UI in region 2.

If you know how, please share. Any helps are all very much appreciated!


Using data trigger to adjust style according to the default style of the application.

Add namespace reference xmlns:shell=http://schemas.microsoft.com/winfx/2006/xaml/presentation/shell at appropriate place.

setters....

Enjoy !!!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜