0

Let's say in my application, there are two regions: 1) used customized theme, and 2) used the system theme (the 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!

1 Answer 1

1

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 !!!

Sign up to request clarification or add additional context in comments.

2 Comments

Correction: Using data trigger to adjust style in xaml according to the default Theme of the application. Detect current theme of the WPF application.
You can edit your answer by clicking edit link at the end of your post

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.