-
Notifications
You must be signed in to change notification settings - Fork 1k
Improve Message Box in WinForms #13440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13440 +/- ##
===================================================
+ Coverage 75.43847% 76.58368% +1.14521%
===================================================
Files 3230 3230
Lines 639097 639238 +141
Branches 47289 47308 +19
===================================================
+ Hits 482125 489552 +7427
+ Misses 147952 146112 -1840
+ Partials 9020 3574 -5446
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
src/System.Windows.Forms/System/Windows/Forms/Dialogs/MessageBox.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/System/Windows/Forms/Dialogs/MessageBox.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/System/Windows/Forms/Dialogs/MessageBox.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/System/Windows/Forms/Dialogs/MessageBox.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/System/Windows/Forms/Dialogs/MessageBox.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/System/Windows/Forms/Dialogs/MessageBox.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/System/Windows/Forms/Dialogs/MessageBox.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/System/Windows/Forms/Dialogs/MessageBox.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/System/Windows/Forms/Dialogs/MessageBox.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/System/Windows/Forms/Dialogs/MessageBox.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/System/Windows/Forms/Dialogs/MessageBox.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/System/Windows/Forms/Dialogs/MessageBox.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/System/Windows/Forms/Dialogs/MessageBox.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/System/Windows/Forms/Dialogs/MessageBox.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/System/Windows/Forms/Dialogs/MessageBox.cs
Outdated
Show resolved
Hide resolved
…hen DarkMode is enabeld
Hey guys, so, I am a bit confused. So, it's not exactly clear to me, what we want to do here. But we will also not have an additional MessageBox, which would do essentially do the same as the old one. We said that we want the TaskDialog to move forward, and I am looking actively at what options we might have, to have that one adapted to dark mode. Yes, it's not ideal that we do not have dark mode support for the native MessageBox-es as it is. The only way to get the old MessageBox display acceptable in dark mode would probably be, to completely reimplement it in WinForms based on what we're actually supporting in terms of dark mode support. That's something I had considered, and I have actually a prototype for testing, and would bring TO a team meeting if time allows during the Preview 6-time frame. But even that is not really likely to make the bar. We need to discuss internally at the next team meeting, and I will follow up, but I do not see a good chance this being taken. Klaus |
I think installing a hook and uninstalling the hook inside of
Are both beyond the scope of MessageBox. However, hooking into it's WndProc to override it into dark mode should be alright as long as the person who opened this PR makes it to where that is not part of the public API surface (to ensure existing code does not break) while also allowing dark mode out-of-box when the developer enables dark mode in their application. The reason for this is that I see a way that this can be done as an implementation detail without exposing any new public API's. |
Fixes #12044
Proposed changes
Screenshots
Before
After
Test methodology
Manually tested via scratch project.
Microsoft Reviewers: Open in CodeFlow