Net11 editable strokes main - #15147
Merged
Merged
Conversation
added 2 commits
September 18, 2026 10:07
## Summary This is the integration/11.0-RC2 version of dotnet#15080 so the state-aware field outlines can be exercised against the RC2 branch. The needed code dependencies are already present on this branch. ## What changed This PR restores the per-state editable-control border model for dotnet#14906 on integration/11.0-RC2. It applies the state-based stroke resolver and linear-light color blending to TextBoxBase, the modern ComboBox adapter, and UpDownBase, keeps the bottom-edge focus cue tapered, restores hover behavior, and preserves a clean one-pixel bottom edge for FixedSingle and None. The ComboBox disabled-border test was also revised for the new low-contrast enabled border. Instead of relying on an enabled-versus-disabled pixel-count difference, it now checks that the enabled field-stroke color is absent from the disabled rendering and that the disabled rendering uses the disabled border color. ## Testing The updated ComboBox disabled-border test passes locally on an equivalent base for all three FlatStyle cases. Integration CI will provide the RC2 runtime confirmation. ## Refs Related to dotnet#14906. This re-lands the intent of dotnet#15080 for integration/11.0-RC2, while the main-first landing remains tracked separately by dotnet#15109. ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/dotnet/winforms/pull/15113) (cherry picked from commit 56fa5d7)
The Net11 UpDown focus edge used 3 DIP instead of 2 DIP. Use 2 DIP in UpDownBase.cs while retaining the shared edge geometry. This puts the UpDown focus indicator in parity with the TextBox. Fixes dotnet#15127 (cherry picked from commit 429109a)
ricardobossan
requested review from
KlausLoeffelmann,
LeafShi1 and
SimonZhao888
September 18, 2026 14:47
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15147 +/- ##
=============================================
Coverage 37.24166% 37.24166%
=============================================
Files 246 246
Lines 9774 9774
Branches 1029 1029
=============================================
Hits 3640 3640
Misses 5970 5970
Partials 164 164
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
LeafShi1
approved these changes
Sep 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14906 and #15127
Summary
I am bringing the two reviewed RC2 fixes into
dotnet/winforms:mainso they remain part of the mainline.Root Cause
The fixes for the modern editable-control border stroke and the UpDown focus indicator were already reviewed and merged on
integration/11.0-RC2, but they were not yet present onmain.Proposed changes
integration/11.0-RC2. This restores the per-state Net11 border-stroke model for modern editable controls, including the resolver, state-specific colors and thicknesses, and the shared tapered bottom edge forTextBox,MaskedTextBox,ComboBoxedit, andUpDownedit.integration/11.0-RC2. This changesModernFocusEdgeThicknessfor the modernUpDownfocus indicator from 3 to 2 device-independent px, matchingTextBoxat every DPI.Risk
Minimal. Both commits retain their cherry-pick traceability lines from the original RC2 commits.
Test environment(s)
Microsoft Reviewers: Open in CodeFlow