-
Notifications
You must be signed in to change notification settings - Fork 991
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
Dark mode experimental feature #11857
Conversation
Pulled from https://github.com/dotnet/winforms/pull/10985/files. Styling features and non-critical changes were stripped out to make this the smallest change possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put back <OptionInfer>Off</OptionInfer>
It should not affect anything in .Net 9 or going forward.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11857 +/- ##
===================================================
- Coverage 74.82010% 74.79107% -0.02903%
===================================================
Files 3016 3018 +2
Lines 629649 629987 +338
Branches 46737 46777 +40
===================================================
+ Hits 471104 471174 +70
- Misses 155180 155429 +249
- Partials 3365 3384 +19
Flags with carried forward coverage won't be shown. Click here to find out more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a surprising compromise, customers will be really happy about.
Unit tests pass, I did a series of exploratory tests, also in conjunction with my async feature, I merged earlier, and this version of the dark mode feature looks really good! What an amazing and surprising ride this was! Lifetime experience! So glad, we made this for .NET 9!
- Move Experimental URL to DiagnosticIds - Move special dark mode logic from CreateBrushScope to GetSysColorBrush - Remove unnecessary logic in FindNearestColor - Update brushes and pens by poking SystemEvents static directly
df24969
to
0d6ae9a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕶️
src/System.Windows.Forms/src/System/Windows/Forms/Controls/ToolStrips/ToolStripMenuItem.cs
Show resolved
Hide resolved
} | ||
|
||
/// <summary> | ||
/// Sets or gets the Form's title bar back color. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should have been text color in the summary.
Verified the issue with .NET 9.0.100-rc.1.24422.10 test pass build, for now the Dark mode have been supported for .NET WinForm project. |
I'm sorry if this is not the right place to ask this, but how can we test it? I am running sdk 9 preview 7 and cant get winforms project to recognize Application.SetDefaultDarkMode at all Please feel free to delete this post if totally out of topic, apologize in advance. |
@creizlein Please install the 9.0 rc1 form https://github.com/dotnet/sdk/blob/main/documentation/package-table.md try to see if Application.SetDefaultDarkMode is available or not if you can access. |
Verified the issue with .NET 9.0.100-rc.1.24452.12 test pass build, for now the Dark mode have been supported for .NET WinForm project. |
The first commit pulls from @KlausLoeffelmann's https://github.com/dotnet/winforms/pull/10985/files. Styling features and non-critical changes were stripped out to make this the smallest change possible.
The second commit are my changes to address my feedback on the original PR mentioned above.
Microsoft Reviewers: Open in CodeFlow