How to Switch Themes in a WPF App at Runtime

preview_player
Показать описание
This video is a step-by-step tutorial on How to Switch Themes in a WPF App at Runtime, You will learn how to set up a Resource Dictionary to contain different themes, create styles and templates for your controls, and dynamically switch between themes at runtime.

Source Code:
Рекомендации по теме
Комментарии
Автор

Thank you for this Video. this would have to be the most professionally explained WPF theme tutorial I have seen to date. Well explained and Included source code project. You are enjoyable to watch, listen to and Learn from.

C_ThreadedBackGWorker
Автор

Mate it's so good to watch you. Lots of these Videos are boring like hell, becuase U have to watch the guys preparing the UI with mistyping 1000 times. But this video is just amizing good, with well prepared content and easy explanation. You are a talented teacher Sir. Well done.

rolandwatz
Автор

Nice, good idea for part 2, store the user choice in settings.settings or something so they don’t have to change it to dark every time they boot the app

liamlluls
Автор

You are a star!! Very helpfull approach!! Thanx for the tutorial!!

NAngelGr
Автор

Very clean and straight forward. **ThumbsUp**

ThomasSchmidt-Esterle
Автор

I'm glad I found your videos; I'm a long time programmer, but I've been doing such varied work that I don't get the chance to focus on things like this. I have a question, though, if I want to create a user control library, it seems like the technique of using DynamicResource doesn't work - I have no way to specify a resource file. I could just write the library, I suppose, as a wpf application instead of a library (I can still easily link to the DLL), but I don't think that's really a great approach.

fredwbd
Автор

I have to agree with what @ThomasSchmidt-Esterle wrote: very clear and straightforward. Many thanks for the simple yet concise explanation.

omostan
Автор

Of course, it doesn't change the little stub in ToolBar.

Ianuarius
Автор

will the "theme change" on the main window also be applied throughout the operation of the application such as a user being re-directed to a new window? or this color change is only applied to one certain window?

MrBiohazard
Автор

How do I can use it with color animations?

helx
Автор

Don't you need to clear the MergedDictionaries as well, before adding every time?

tombobadil
Автор

Could you add a x:Name and only change the source property Source? Or is there something that I missed?

Azimof