Search code examples
c#wpf

WPF/XAML doesn't look like system theme


I would expect a default project for WPF to use the exact system theme, but the default theme for WPF looks somewhat akin to Windows 10, but not quite. And rather ugly if I had my opinion. My question is - how do I make WPF follow system theme?

Screenshot below is running in Windows 11. It's just a deafult project using File > New Project > WPF Application

Image showing WPF

This screenshot is from some random Visual Studio menu. Obviously these buttons look much different.

enter image description here


Solution

  • I would expect a default project for WPF to use the exact system theme ...

    I am afraid your expectation is wrong. The default WPF templates have not been updated for Windows 11 and I strongly doubt they ever will be.

    If you want a modern UI experience in your Windows apps, I would recommend you to look into using WinUI (3). It's the the next generation native UI layer for Windows, including full-trust desktop apps.