.NET version
.NET 10.0.100-alpha.1.24611.5
Did it work in .NET Framework?
Yes
Did it work in any of the earlier releases of .NET Core or .NET 5+?
Yes, cannot repro in .NET 8.0. Also repro in .NET 9.0 + binaries built from release/9.0 branch of winforms repro. And caused by PR12479 .
Issue description
Sometimes, the focus rectangle focus on property's edit part when using up/down to switch property items in PropertyGrid .
Actual result:
The focus rectangle sometimes focus to edit part.
Issue1.mp4
Expected result:
The focus rectangle always focus to property item.
Issue1without.mp4
More info:
This issue cannot repro in Inspect/Narrtor/NVDA tool.
This issue also repro in go through the drop down list item using up/down keyboard.
Steps to reproduce
Create a .NET Core Winforms project.
Add a TextBox and PropertyGrid controls in form designer.
Set the SelectedObject property to TextBox1 in propertyGrid1 control.
Build and run project.
Open Accessible Insight tool and select anyone property in propertyGrid control.
Press up/down keyboard.