dotnet / wpf

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

Should WPF add the new theme for Windows11 style? #4749

Open lindexi opened 3 years ago

lindexi commented 3 years ago

As we know, the Windows11 introduced a new UI styles. Should WPF add the new theme to adapt the Windows11?

hez2010 commented 3 years ago

+1 for refreshing styles in WPF with latest WinUI design.

sungaila commented 3 years ago

AFAIK there was no theme update for Windows 10. The current Aero2 theme from Windows 8.x differs quite a lot from native Windows 10 UI.

If you skip to create a new theme once more, the difference between native Windows 11 and current WPF will become noticable and quite jarring.

Poopooracoocoo commented 3 years ago

Relevant issues: #3775 #2322 #1485

lindexi commented 3 years ago

Thank you @Poopooracoocoo

dhrdlicka commented 3 years ago

AFAIK there was no theme update for Windows 10. The current Aero2 theme from Windows 8.x differs quite a lot from native Windows 10 UI.

Windows 10 only changed the window frames for Win32/WinForms, most controls are untouched since Windows 8. However, Aero2 is a weird hybrid that includes elements from both the old and new Aero as well as Aero Lite that looked out of place even on Windows 8.

Not sure how high on the priority list this would be, but it would be cool if in addition to a Windows 11 theme there was also a proper Windows 8/10 theme (although it's almost 10 years too late for that).

mdtauk commented 3 years ago

Windows 11 has taken the effort to begin updating the Win32 Controls and colours in the MSStyles. But WPF requires their own presentation styles and templates, and do not adopt what the OS provides.

BieleckiLtd commented 3 years ago

Windows 11 has taken the effort to begin updating the Win32 Controls and colours in the MSStyles. But WPF requires their own presentation styles and templates, and do not adopt what the OS provides.

Which is a good thing imho. I don’t really get the arguments that an app looks best when it looks “native”. Take a look at the VS Code or Teams, they are nothing like OS yet look great. I’d much more prefer knowing my app looks the same on every OS rather than “native”.

That said it would be great to see W11 styled controls in the WPF just because W11 looks really neat.

dhrdlicka commented 3 years ago

Which is a good thing imho. I don’t really get the arguments that an app looks best when it looks “native”. Take a look at the VS Code or Teams, they are nothing like OS yet look great. I’d much more prefer knowing my app looks the same on every OS rather than “native”.

It is absolutely not a good thing if the default behavior for WPF is to use assets that intentionally resemble the native OS controls, depending on the OS version and active theme. Continuing to use the Windows 10 theme therefore makes no sense aesthetically if the same app that looked very close to native on earlier versions (or at least tried to on newer versions because Aero2 is far from perfect, as I stated above) looks nothing like it on Windows 11.

Splitwirez commented 3 years ago

@dhrdlicka Windows 10's default visual style changed far more than just the window frames. The checkmarks on the checkboxes were redone, as were most of the list items, and I believe the gradients on most of the buttons were tweaked (yes, there were gradients on the buttons in Windows 8...barely...), as well as a multitude of icons (the Task Dialog arrows come to mind, for starters).

Personally, I'm in favour of a Windows 11-mimicking theme.

I just hope it doesn't come at the cost of, say, the leftover XP themes - those are still relevant on occasion, such as when triggered by a third-party Windows visual style which uses the same .msstyles filename as Windows XP's standard visual styles. I understand that neither Windows nor WPF officially supports third-party visual styles, but if I am correct in suspecting there isn't a huge maintenance or disk footprint cost associated with not removing the XP visual styles, I'd argue there's more good to come from leaving them in than bad.

jonasnordlund commented 3 years ago

This would be amazing but I don't expect it given how little work has been done on WPF styles for the past few years. For now, I can only recommend trying out ModernWPF although it doesn't actually support Windows 11 styles specifically (as in e.g. the Mica material), as of writing this at least. It has open issues logged for this but I'm not sure the main developer has time to port these. The supported styles are basically pre-WinUI 2.6 and still far closer to Windows 11 than the default style.

gaetandezeiraud commented 2 years ago

WPF now accept community PR. One solution would be to develop by ourselves. I tried, without the micro interactions to redo some elements. Based on the Windows-UI Figma file and WinUI XAML style https://github.com/microsoft/microsoft-ui-xaml/tree/main/dev/CommonStyles.

ezgif com-gif-maker

jonasnordlund commented 2 years ago

Yes, among the most obvious community PR's to me would then be an effort to update WPF styles for Windows 11. :) Such an effort could also involve extending Window to support the scenario in #4967.

gaetandezeiraud commented 2 years ago

Also, some elements don't exist in WinUI 2.x or 3.x. Or need to be changed like the ListBox (the WinUI version is not very Desktop friendly). So not an easy task. Maybe we can get inspiration from the Microsoft Office refresh. But not sure than the style can be accepted by the WPF Team.

Here an implementation of a custom ListBox : unknown

gaetandezeiraud commented 2 years ago

https://github.com/lepoco/wpfui

NeilBurkholder commented 2 years ago

https://github.com/NC-Automation/WPF.Win11Style ff4b08bbbd9244e3fd991df9fa0a3adbc9d7d3a5

mdtauk commented 2 years ago

Ideally the same Design Tokens from the WinUI team, would be used for the WPF controls on Windows 10 and 11.

Some mechanism would need to be added for Dark and Light modes however, as this system level concept only exists in Windows 10 and 11, so backwards compatibility for Windows 8 and 7 would need to be considered.