.NET version
.NET 11.0.100-preview.7.26365.114 + Private dlls built from Net11/Integration-3 branch of https://github.com/KlausLoeffelmann/winforms repo
Did it work in .NET Framework?
Yes
Did it work in any of the earlier releases of .NET Core or .NET 5+?
Not support, new feature of #14768
Issue description
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.
.NET version
.NET 11.0.100-preview.7.26365.114 + Private dlls built from Net11/Integration-3 branch of https://github.com/KlausLoeffelmann/winforms repo
Did it work in .NET Framework?
Yes
Did it work in any of the earlier releases of .NET Core or .NET 5+?
Not support, new feature of #14768
Issue description
When
VisualStylesModeis set toNET11, aButtoncorrectly uses the Windows accent-colored focus indicator when hosted directly on aFormor on other common container controls:Panel, GroupBox, FlowLayoutPanel, TableLayoutPanel, SplitContainer.Panel.However, when the same
Buttonis hosted on aTabPage, 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
Accent color(for example, Red).VisualStylesModetoNET11.Buttondirectly on the Form.TabControlcontaining aTabPagewith anotherButton.