dotnet / wpf

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

Feature: new WPF style for Windows 10 #1485

Closed Berrysoft closed 1 month ago

Berrysoft commented 5 years ago

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.

mdtauk commented 5 years ago

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.

weltkante commented 5 years ago

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.

lindexi commented 5 years ago

Do you means UWP controls in desktop apps - Windows apps | Microsoft Docs ?

Berrysoft commented 5 years ago

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.

weltkante commented 5 years ago

@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.

mdtauk commented 5 years ago

@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)?

weltkante commented 5 years ago

@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.)

mdtauk commented 5 years ago

@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.

Shadowblitz16 commented 4 years ago

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.

Poopooracoocoo commented 4 years ago

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).

Poopooracoocoo commented 4 years ago

uh. is this ever going to be seen

Shadowblitz16 commented 4 years ago

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

mdtauk commented 4 years 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

Poopooracoocoo commented 4 years ago

@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.

:)

Shadowblitz16 commented 4 years ago

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

jonasnordlund commented 3 years ago

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.
ygoe commented 2 years ago

WPF never really looked native after Windows 7. After a good theme for XP, they made such a great effort for Windows 7 (or was it Vista? can't remember that one), even including the animations that existed back then. Windows 8 had a slight gradient and soft border on the buttons when WPF only had that flat something of a box. Feels very unloved since then. And even more alien on Windows 10. I don't have Windows 11 but it seems to have moved on even further. WPF doesn't seem to be preferred technology anymore. But then, what is?

optimus-code commented 1 month ago

It's a shame WPF is a second-class citizen in the .NET ecosystem. MS keeps ignoring the huge demand for real desktop apps, WPF is a fantastic framework and is unrivalled in productivity - or was. It needs some love and attention, since .NET Core versions the built in themes are just broken. There's inconsistencies everywhere and it's a huge shame. We need WPF to look native on all windows versions.

echoix commented 1 month ago

There's work already done for the Win 11 Fluent style in .NET 9 this November. Check the presentation videos at the build conference. (I'm only a user)

I also was able to read some WinUI 3 with WPF docs on the documentation website, so at least there's some effort there too.