dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.29k stars 957 forks source link

Epic - Align with Win11 look and feel #6270

Open merriemcgaw opened 2 years ago

merriemcgaw commented 2 years ago

Windows 11 implemented a new look and feel. While we get most of that automatically through the Common Controls we do have several places where we owner draw our controls and these should be enhanced in some way to look more aligned with Windows. This is part of our dotnet/planning/issues/27 theme.

I will be creating and adding issues to this epic in the coming weeks to outline precisely what we need to be doing.

kirsan31 commented 2 years ago

3691? 😌

AraHaan commented 2 years ago

@merriemcgaw is there plans to have it auto select dark mode for everything if Windows is in Dark mode (to color everything including scrollbars dark like in Windows Explorer).

Bonus Points: If the Windows Team can expose a way to make all MessageBoxes/TaskDialogs, as well as all of the Common Controls dark as well too.

Although it would be cool if there was apis where an application can create it's own Themes (that SetWindowTheme can be called with) that only can be used by the application that "registers" that theme only during the lifetime of the application. This is so users can basically provide their own visual styles and Windows would use them without them needing to change any of their code or needing to dig into undocumented window messages, etc just to override certain things.

An example is an application with multiple icons where say, icon 1 is purple (which makes the application needing to be themed entirely in purple colors), icon 2 is pink (which makes the application needing to be themed entirely in pink colors), or light/dark to match the OS when an icon is not selected.

merriemcgaw commented 2 years ago

Our plans are in the very early stages @AraHaan. I'm working with Windows to make sure an API is available that exposes to WinForms whether the OS is set to light theme or dark theme. We'd obviously expose this in WinForms APIs as quickly as we can. But going as far as a full automatic theme, I can't predict a timeline for that. We've got some ideas but there's also issue prioritization and resourcing to consider.

If anyone has specific API suggestions or ideas around this we are excited to see them😄.

AraHaan commented 2 years ago

I guess a possible winapi header for it could look like so:

WINAPI BOOL IsSystemLightThemeMode(); /* For getting if the OS is in light mode or dark mode. */
/* a special version of all of the MessageBox and TaskDialog apis that
adds BOOL lightMode as a parameter (and have the original basically stub
into it with it set to true to avoid code duplication on the implementation level). */

Oh course that would need to be done on the Windows sides and more work might need to be done to allow it for basically all of the common controls apis, etc.

AuracleTech commented 2 years ago

image Do you know how sad this made me... I... I'll stop programming...

RussKie commented 2 years ago

This is a Windows issue, a pure MFC app will look the same.

merriemcgaw commented 2 years ago

@RussKie is correct. We're going to revisit this issue again with Windows. The concept of MDI apps is not something Windows is recommending as an approach to UI design, so getting them to make a change like this is pretty difficult.

memoarfaa commented 2 years ago

@RussKie

This is a Windows issue, a pure MFC app will look the same.

https://user-images.githubusercontent.com/12494184/148296043-48b700b7-3164-4c04-b98d-baf4e8f39d6d.mp4

May be but it's beautiful to draw it. paint Non Client area not easy for all. make Chrome window for mdi ,Child ,normal Window is required if asp.net core didn't do it who will do

memoarfaa commented 2 years ago

@merriemcgaw

@RussKie is correct. We're going to revisit this issue again with Windows. The concept of MDI apps is not something Windows is recommending as an approach to UI design, so getting them to make a change like this is pretty difficult.

Windows fix will not be good issue but custom NC area WndProc theme messages will be

RussKie commented 2 years ago

If you have a fix in mind, please feel free to open a draft PR to continue the discussion.

memoarfaa commented 2 years ago

If you have a fix in mind, please feel free to open a draft PR to continue the discussion.

you already see the fix but there is some of points need to discuss how to introduce it. I will open discussion

kirsan31 commented 2 years ago

@memoarfaa

you already see the fix but there is some of points need to discuss how to introduce it. I will open discussion

You can use existing one.

KlausLoeffelmann commented 4 months ago

Take a look at this:

10985