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
Port the ListViewItemPresenter/GridViewItemPresenter focus rectangle (FocusBorderBrush, FocusSecondaryBorderBrush) #25923
area/listview 📃Categorizes an issue or PR as relevant to the ListView controlarea/porting 🖨️Categorizes an issue or PR as relevant for porting of WinUI codekind/enhancementNew feature or requestproject/items 🧾Categorizes an issue or PR as relevant to items (ItemsControl, ItemsRepeater, ...)
The focus rectangle part of the ListViewItemPresenter / GridViewItemPresenter chrome, ported from WinUI. PR #25389 ports the chrome, but these properties are still marked [Uno.NotImplemented] because nothing reads them yet:
CListViewBaseItemChrome::CustomizeFocusRectangle (ListViewBaseItemChrome.cpp:3630) driving the focus visual. It picks m_pFocusSecondaryBorderBrush / m_pFocusBorderBrush as the first/second focus brushes (around lines 3572-3580). GridView items pick the state background as the second brush, with the 2px s_gridViewItemFocusBorderThickness border.
The m_isFocusVisualDrawnByFocusManager handshake between the chrome and the focus manager. WinUI does it per render walk; see the TODO Uno in ListViewBaseItemChrome.uno.cs. CalendarViewBaseItemChrome.CustomizeFocusRectangle is an existing Uno precedent.
The GridView focus border with a non-solid SelectedBackground, which today silently drops the border.
FocusVisualKind=DottedLine, which today renders nothing for chromed items.
Removing [Uno.NotImplemented] from the three properties, with runtime tests: keyboard focus on a ListView and a GridView item, in light, dark and high contrast.
Why is this needed? 🤔
Keyboard focus on ListView/GridView items doesn't honor these brushes. Theme resources such as ListViewItemFocusBorderBrush / GridViewItemFocusBorderBrush and app overrides have no effect, which hurts keyboard and high-contrast accessibility parity with WinUI.
For which platforms 📱💻🖥️
All (Skia)
Anything else we need to know? 💬
Follow-up to #25389 (ListViewItemPresenter/GridViewItemPresenter chrome port), raised in review.
State after the latest #25389 update, for whoever wires this:
Interim behavior: until CustomizeFocusRectangle is called by the focus visual, IsFocusVisualDrawnByFocusManager() (ListViewBaseItemChrome.uno.cs) returns false. So the non-rounded Overlay (GridView) chrome keeps drawing its selection/pointer-over ring on a keyboard-focused item, instead of losing it. When this is wired, restore the WinUI hand-off and flip When_GridView_Overlay_State_Ring_Drawn_While_Keyboard_Focused, so the ring is expected from the focus visual's second rectangle.
Brush types:FocusRectangleOptions.firstBrush and secondBrush are now typed Brush, matching WinUI's static_cast, so gradient and acrylic state brushes can stroke the ring.
area/listview 📃Categorizes an issue or PR as relevant to the ListView controlarea/porting 🖨️Categorizes an issue or PR as relevant for porting of WinUI codekind/enhancementNew feature or requestproject/items 🧾Categorizes an issue or PR as relevant to items (ItemsControl, ItemsRepeater, ...)
Activity
fix(listview): Address chrome rendering review
fix(listview): Address chrome rendering review
fix(listview): Address chrome rendering review
fix(listview): Address chrome rendering review
fix(listview): Address chrome rendering review
MartinZikmund commentedon Nov 14, 2026
State after the latest #25389 update, for whoever wires this:
CustomizeFocusRectangleis called by the focus visual,IsFocusVisualDrawnByFocusManager()(ListViewBaseItemChrome.uno.cs) returnsfalse. So the non-rounded Overlay (GridView) chrome keeps drawing its selection/pointer-over ring on a keyboard-focused item, instead of losing it. When this is wired, restore the WinUI hand-off and flipWhen_GridView_Overlay_State_Ring_Drawn_While_Keyboard_Focused, so the ring is expected from the focus visual's second rectangle.FocusRectangleOptions.firstBrushandsecondBrushare now typedBrush, matching WinUI'sstatic_cast, so gradient and acrylic state brushes can stroke the ring.fix(listview): Address chrome rendering review
fix(listview): Address chrome rendering review
fix(listview): Address chrome rendering review
fix(listview): Address chrome rendering review
fix(listview): Address chrome rendering review
fix(listview): Address chrome rendering review
fix(listview): Address chrome rendering review
fix(listview): Address chrome rendering review