dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.03k stars 1.16k forks source link

First-class support for custom themes #110

Open gix opened 5 years ago

gix commented 5 years ago

It is currently not possible to use a custom theme as a drop-in replacement for a system theme. While it is possible to style everything, it requires more cumbersome work that is easily missed.

For example:

My high-quality Aero themes for WPF use reflection and method hooking to solve these problems (But that's just a brittle hack. In fact, it breaks on .NET Core because tiered compilation makes hooking more difficult.). It does so by replacing System.Windows.SystemResources.FindDictionaryResource, normally responsible for locating the theme resource assembly and style for a given type or resource key, with one that can load custom resource dictionaries.

So my wish would be for adoption of a public API to set policies for resource loading, at least for PresentationFramework.dll.

Poopooracoocoo commented 4 years ago

It makes me sad that this is more than a year old. :(