Skip to content

Conversation

KlausLoeffelmann
Copy link
Member

@KlausLoeffelmann KlausLoeffelmann commented Aug 20, 2024

Backport the Dark Mode Fix into .NET 9Rel.
The original bug fix (#11907) addressed a series of issues (#11910, #11898, #11897, #11895).

Since the original bug fix used Properties-APIs, which are not available in .NET 9RC/Rel, a few adjustments had to be made here. To further ensure stability, I added basic unit tests for dark mode. 

Customer Impact

We introduced a new experimental Feature “Dark Mode”. This accidentally regressed VB Apps, which are no longer able to enable Visual Styles. This PR would also address a couple of minor issues in Dark Mode itself, which have been found in recent testing.

Workaround: For the VB Part, there is no easy workaround, since Application.EnableVisualStyles is usually run in Program.cs, and in a VB App Framework App, there is no equivalent.
The issues of the new features do not have a workaround, but they also did not exist before.

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low –The changes are isolated and are not affecting anything else.

Verification

  • Manual testing – Several manual tests made sure, Visual Basic Apps are no longer broken.
  • Automated – We added Dark Mode area specific Unit Tests in addition.
Microsoft Reviewers: Open in CodeFlow

Add plausibility unit tests.
Apply backwards-compatibility (10->9) fix.
Refactor System-handling for SetColor.
Fix XML comments and property value handling in Formxxx properties.
Fix bug where in Visual Basic VisualStyles no longer get applied.
Fix raising wrong event on changing FormCaptionTextColor.
@KlausLoeffelmann KlausLoeffelmann added this to the 9.0 RC2 milestone Aug 20, 2024
@KlausLoeffelmann KlausLoeffelmann self-assigned this Aug 20, 2024
@KlausLoeffelmann KlausLoeffelmann marked this pull request as ready for review August 20, 2024 05:34
@KlausLoeffelmann KlausLoeffelmann requested a review from a team as a code owner August 20, 2024 05:34
@lonitra lonitra changed the base branch from main to release/9.0 August 20, 2024 17:21
@KlausLoeffelmann KlausLoeffelmann changed the title Backport 9Rel Dark Mode fix [Release/9.0] Backport Dark Mode fix Aug 20, 2024
Copy link

codecov bot commented Aug 20, 2024

Codecov Report

Attention: Patch coverage is 58.82353% with 21 lines in your changes missing coverage. Please review.

Project coverage is 74.80783%. Comparing base (61c8ee8) to head (feda40a).
Report is 13 commits behind head on release/9.0.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           release/9.0      #11929         +/-   ##
=====================================================
+ Coverage     74.72644%   74.80783%   +0.08138%     
=====================================================
  Files             3019        3019                 
  Lines           630034      630057         +23     
  Branches         46781       46783          +2     
=====================================================
+ Hits            470802      471332        +530     
+ Misses          155858      155352        -506     
+ Partials          3374        3373          -1     
Flag Coverage Δ
Debug 74.80783% <58.82353%> (+0.08138%) ⬆️
integration 18.03646% <24.24242%> (+0.21683%) ⬆️
production 47.81618% <45.45455%> (+0.18064%) ⬆️
test 97.00766% <83.33333%> (-0.00101%) ⬇️
unit 44.81907% <42.42424%> (+0.00695%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@KlausLoeffelmann KlausLoeffelmann changed the title [Release/9.0] Backport Dark Mode fix [RC2/9.0] Backport Dark Mode fix Aug 20, 2024
@KlausLoeffelmann KlausLoeffelmann requested a review from dondr August 20, 2024 23:50
@KlausLoeffelmann KlausLoeffelmann merged commit f011f09 into dotnet:release/9.0 Aug 22, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 23, 2024
@KlausLoeffelmann KlausLoeffelmann deleted the DarkMode9RelBackPortFix branch May 26, 2025 20:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants