Wpf: Feature: new WPF style for Windows 10

Created on 31 Jul 2019  路  16Comments  路  Source: dotnet/wpf

The WPF style now used on Windows 10 doesn't match the legacy controls, which is created by WinForms. Here is a screenshot to compare some of them:

image

I suggest we should write a set of new style to match Windows 10 WinForms style, and also another new style for dark mode in Windows 10.

issue-type-enhancement

Most helpful comment

@mdtauk maybe its a misunderstanding. I'm saying you can't just use the WinUI XAML in WPF due to the underlying technological difference, but you'd have to recreate the style based on the WPF controls.

If you also meant to recreate the "current" shell/common controls in WPF using WinUI as reference, thats fine with me and we are basically saying the same thing. The line about the "opt in" was confusing though because it sounded like you wanted to just reuse the WinUI XAML.

What I'm against is telling WPF developers "just use the WinUI controls instead of the WPF ones and you get a modern style" because that would be basically telling them to migrate away from WPF. They should have a modern style native to WPF.

(Note that at this point XAML is not a technology but a concept shared by multiple technologies in incompatible ways, so "the shell is moving to XAML" is very ambigous, unless you also say which dialect/technology of XAML you mean.)

All 16 comments

Maybe when a WPF app opts into the new WinUI 3.0 for Desktop - it could use the new styles coming with WinUI 3.0.

This could bring it into line with Fluent Design, the new Windows 10 Shell being worked on, Fabric Web, FastDNA, and all the other Microsoft UI frameworks.

How is WPF/WinUI interop going to work? Is WPF going to use the WinUI rendering engine? Otherwise I can't imagine a simple "opt in" working mixing classic WPF XAML with WinUI XAML in the same visual tree, they are different XAML dialects with different backing control classes, using incompatible APIs. People who want WPF XAML will still want up-to-date UI for their controls without moving everything (in particular 3rd party controls) to WinUI.

I agree with @weltkante . Although I could use WinUI, I still want up-to-date WPF style.

Now I write cross-platform programs with Eto.Forms, which is a cross-platform GUI framework. It uses four backends on Windows - WinForms, DirectX, WPF and GTK# - but I prefer WPF. I can't use WinUI or WinRT Xaml because it is hard to embed them into an Eto.Forms program.

@lindexi no he means the recently announced WinUI 3.0 which will have support for Desktop along the existing UWP. It will have better integration with WinForms/WPF than your linked UWP XAML Islands.

@weltkante The Windows Shell is changing, so you would assume the Common Controls would also be updating. If that is the case, then any changes to the standard WPF control templates, and the Win32 Common Controls, should probably be designed to match the style of the shell.

The shell is moving to XAML, so WinUI 3.0's control changes, would be leading the changes.

Why should the visual style not all match (even if the size of controls, font sizes, etc would differ)?

@mdtauk maybe its a misunderstanding. I'm saying you can't just use the WinUI XAML in WPF due to the underlying technological difference, but you'd have to recreate the style based on the WPF controls.

If you also meant to recreate the "current" shell/common controls in WPF using WinUI as reference, thats fine with me and we are basically saying the same thing. The line about the "opt in" was confusing though because it sounded like you wanted to just reuse the WinUI XAML.

What I'm against is telling WPF developers "just use the WinUI controls instead of the WPF ones and you get a modern style" because that would be basically telling them to migrate away from WPF. They should have a modern style native to WPF.

(Note that at this point XAML is not a technology but a concept shared by multiple technologies in incompatible ways, so "the shell is moving to XAML" is very ambigous, unless you also say which dialect/technology of XAML you mean.)

@weltkante As I understand it, when WinUI 3.0 comes out, XAML Islands will not be how you combine WinUI Xaml and WPF. So you may have to compile your app with the latest SDK, before it will use any updated control designs.

Eitherway, WPF's control templates, should be refreshed alongside the WinUI Xaml controls, and the Win32 Common Controls - which should all take its lead from the Windows Design Team, and they follow Fluent Design.

I think wpf should look native on classic, xp, vista, 7, and 8 too.
idk if wpf even runs on xp but it would be nice know if it did the controls would look native.

WPF looks really Windows 8-ey. I remember using Windows 8.1 and winforms looked like that too. I really hope Microsoft applies Fluent Design to all three but I don't see that happening especially as Microsoft both ditches and embraces UWP and still can't get consistency within Windows 10's UWP UI (like the system media controls).

uh. is this ever going to be seen

in my opinion I think both winforms and wpf should looks the same and should use the proper rendering api's for each os.

this could also be made to work cross platform so that when and if wpf or winforms does go cross platform they can look native on max and linux

although I also think that the menustrip, toolstrip, and contextmenustrip should have done this a long time ago

WPF is closer to WinUI in the fact they use Xaml and have control templates.

Ideally there would be a Classic Theme - Winforms
and a Modern Theme - WinUI

So a WPF dev could pick which style they want. The control metrics could be the same, with only the style changing

@Felix-Dev said:

The WinUI team, which now owns WPF, said in the July Community Call that they plan to update the WPF styles for Fluent Design. They also said they would like to see the community helping them out with this so if this is a major concern for you, you might wanna help out here if possible.

:)

I honestly think gui theming should not be in the hands of the developer
it should be in the hand of the user and should be consistent across the whole os.

this is part of the reason windows 10 has 6 different context menus

I agree with @weltkante . Although I could use WinUI, I still want up-to-date WPF style.

Now I write cross-platform programs with Eto.Forms, which is a cross-platform GUI framework. It uses four backends on Windows - WinForms, DirectX, WPF and GTK# - but I prefer WPF. I can't use WinUI or WinRT Xaml because it is hard to embed them into an Eto.Forms program.

I've looked around pretty hard for this myself and think this might be your best bet: https://github.com/Kinnara/ModernWpf

It's easy to migrate to and has ports of the WinUI controls for WPF. Note two things though:

  1. There is an issue with using it in a class library project. (it has been reported)
  2. It's still very much in active development which can be good and bad.
Was this page helpful?
0 / 5 - 0 ratings