You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Button hosted on a TabPage does not use the Windows accent-colored focus indicator with VisualStylesMode = NET11 #14772
When VisualStylesMode is set to NET11, a Button correctly uses the Windows accent-colored focus indicator when hosted directly on a Form or on other common container controls: Panel, GroupBox, FlowLayoutPanel, TableLayoutPanel, SplitContainer.Panel.
However, when the same Button is hosted on a TabPage, it does not use the Windows accent color and instead falls back to the traditional focus rendering.
The behavior is inconsistent and appears to depend on the parent container.
Button in GroupBox:
Button in TabControl.TabPage:
Steps to reproduce
In Windows Settings > Personalization > Colors, select a noticeable Accent color (for example, Red).
Create a WinForms application targeting .NET 11.
Set the Form's VisualStylesMode to NET11.
Add:
A Button directly on the Form.
A TabControl containing a TabPage with another Button.
Run the application.
Focus both buttons using either the mouse or the keyboard.
changed the title [-][VisualStylesMode: Net11] Button hosted on a TabPage does not use the Windows accent-colored focus indicator with VisualStylesMode = NET11[/-][+]Button hosted on a TabPage does not use the Windows accent-colored focus indicator with VisualStylesMode = NET11[/+]on Jul 21, 2026
@KlausLoeffelmann@SimonZhao888 Referring to the WinUI effect, could we consider removing the background highlight and only drawing a rounded border when the button is focused?
My concern is that if a button is supposed to be highlighted using the Accent Color, it should probably appear that way from the beginning rather than only when it receives focus.
Maybe Accent-colored buttons should be handled through a dedicated opt-in property (for example, a UseAccentColor property), while the focus state only adds an Accent-colored border.
Verified the issue with .NET 11 Oct 2026 Update Validation test pass build .NET 11.0.0-RC.2.26427.104, the issue has been fixed that have the same test results as above.
Activity
[-][VisualStylesMode: Net11] Button hosted on a TabPage does not use the Windows accent-colored focus indicator with VisualStylesMode = NET11[/-][+]Button hosted on a TabPage does not use the Windows accent-colored focus indicator with VisualStylesMode = NET11[/+]LeafShi1 commentedon Sep 3, 2026
@KlausLoeffelmann @SimonZhao888 Referring to the WinUI effect, could we consider removing the background highlight and only drawing a rounded border when the button is focused?
My concern is that if a button is supposed to be highlighted using the Accent Color, it should probably appear that way from the beginning rather than only when it receives focus.
Maybe Accent-colored buttons should be handled through a dedicated opt-in property (for example, a UseAccentColor property), while the focus state only adds an Accent-colored border.
Recording.2026-09-02.202935.mp4
Olina-Zhang commentedon Sep 4, 2026
Verified in the .NET 11 RC2 build: 11.0.100-rc.2.26453.107 + private dlls built from main branch of Winforms repo, it was fixed:

Zheng-Li01 commentedon Sep 23, 2026
Verified the issue with .NET 11 Oct 2026 Update Validation test pass build .NET 11.0.0-RC.2.26427.104, the issue has been fixed that have the same test results as above.