Repository navigation
Description
Testing Results
Performed re-validation of the TextBoxBase modern field stroke implementation (TextBox, MaskedTextBox, and RichTextBox) under VisualStylesMode.Net11 for GH PR: #14919 after the latest updates
State transitions behave as expected:
- Rest state displays a distinct Hover state when the pointer moves over the control.
- Focused state displays the accent-colored bottom edge as designed.
- ReadOnly controls do not enter a Hover visual state.
- Disabled controls remain visually unchanged regardless of mouse interaction.
- State precedence appears consistent with the documented model:
Disabled > Focused > ReadOnly > Hover > Rest.
Previously reported design feedback items have been addressed and the overall visual appearance is now more consistent across states.
But have 3 opening issues, related to BorderStyle-specific state rendering.
Design Feedback
Feedback 1: Rest State Bottom Edge Could Better Align with the Focus-State Geometry - Resolved
Feedback 2: Focus Bottom Edge Appears Slightly Too Thick - Resolved
Feedback 3: Hover State Reduces the Apparent Editable Area - Resolved
Feedback 4: ReadOnly and Disabled States Introduce a Visible Inner Border - Resolved
Custom BackColor setting, except disabled RichTextBox control(It has issue here: #15053):
Setting Padding to 20:
Issue 1: Both design time and runtime , no border existing when BolderStyle is FixedSingle for TextBox/MaskedTextBox/RichTextBox controls - partially fixed, for RichTextBox with BorderStyle = none, it should haven't border --- Filed a separate issue: #15055
VisualStylesMode = NET11:

VisualStylesMode = Classic:
Issue 2: FixedSingle BorderStyle Applies Accent Color to the Entire Border
Observed Behavior
When the control receives focus:
• The accent color is applied to the entire border (top, left, right, and bottom).
• The control displays a full accent-colored outline.
Affect controls: TextBox/MaskedTextBox/RichTextBox
Impact
This creates an inconsistent appearance across BorderStyle variants and differs from the intended TextBoxBase focus-state design, where focus is indicated by an accent-colored bottom edge rather than a full border outline
Issue 3: Hover Visual State Is Missing for FixedSingle and None BorderStyles
Observed Behavior
When the pointer moves over the control:
• BorderStyle = Fixed3D
○ A visible Hover state is displayed.
• BorderStyle = FixedSingle
○ No visible difference between Rest and Hover states.
• BorderStyle = None
○ No visible difference between Rest and Hover states.
Affect controls: TextBox/MaskedTextBox/RichTextBox
Impact
The same control exhibits different state behavior depending on BorderStyle. As a result, users receive Hover feedback with Fixed3D, but no Hover feedback with FixedSingle or None, leading to inconsistent interaction behavior.
Activity
ricardobossan commentedon Sep 9, 2026
@Olina-Zhang @KlausLoeffelmann @LeafShi1 @SimonZhao888
Thanks, Olina. I reran the checks for PR #14919 with the DLLs from the current build at
\\mlangfs1\Public\Winforms\v-rbossan\PR_14919.The attached
ScratchProject.diffshows the runtime harness changes, and the runtime GIFs cover issues 1, 2, and 3 across all tested states in both light and dark themes. Based on that coverage, none of the three reports represents a defect introduced by this PR.ScratchProject.diff.zip
Issue 1: None border artifact (#15055)
At runtime,
FixedSingledraws its border forTextBox,MaskedTextBox, andRichTextBox, whileNonehas no border for each of those controls, includingRichTextBox. The harness diff and runtime GIFs cover these combinations, and the artifact is not present at runtime.The artifact can be seen in the VS designer, but the A/B comparison shows that it predates this change and is reduced by the PR. I used the same project and designer, changing only the WinForms build. With the stock build, where this PR is not applied, a
Nonecontrol shows the artifact beside bothFixed3DandFixedSingle. With the PR build, it remains only besideFixedSingle; theNoneplusFixed3Dcase is resolved. The design-time A/B GIFs are attached.STOCK designer (PR not applied), None control shows the artifact next to both Fixed3D and FixedSingle:
PR-build designer, artifact only next to FixedSingle, the None+Fixed3D case is fixed:
This makes the earlier observation consistent with stock behavior while also showing an improvement from the PR. The remaining
NoneplusFixedSinglecase is design-time behavior suited to the broader visual-styles work owned by Simon and tracked in #15055, rather than a regression from this change.Issue 2: FixedSingle focus accent
The full-outline accent for a focusedFixedSinglefield is consistent with that style's outlined appearance.Fixed3Drepresents a raised or filled field, so its focus indication is limited to the lower edge. These are different focus treatments for the two border presentations.@[Leaf handle], could you confirm here as the design owner whether thisFixedSinglefocus treatment is the intended result, or establish the expected alternative if it should change? Keeping that decision in this thread gives Olina and Klaus a shared reference. I am treating it as intended pending Leaf's confirmation.Klaus explained in today' s meeting that we should only have the bottom-border visible. I'll address this issue in the next commit.
Issue 3: Hover state for FixedSingle and None
The lack of hover feedback for
FixedSingleandNonematches classic behavior. The classic themed edit border corresponding toFixed3Dis the only one of these styles with an established hot state, and the attached Net11-versus-Classic comparison shows the same result forFixedSingleandNone.ScratchProject hover A/B, FixedSingle and None, hover behavior identical between Classic and Net11
Design-time and merge readiness
Designer rendering takes place in the out-of-process designer server. The attached A/B test keeps the designer and project constant and swaps only the WinForms build, isolating the fact that the artifact exists in stock and is reduced by this PR. The residual
FixedSingledesign-time case belongs with the visual-styles work and #15055.