Skip to content

Commit d36adbe

Browse files
TopperDELArlodotexe
authored andcommitted
Fix issue with Windows 11 ListViewStyle
Copy of existing PR
1 parent e3cd8ec commit d36adbe

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

components/Extensions/src/ListViewBase/ListViewExtensions.AlternateRows.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,20 @@ private static void SetItemContainerBackground(ListViewBase sender, Control item
192192
if (itemIndex % 2 == 0)
193193
{
194194
itemContainer.Background = GetAlternateColor(sender);
195+
var rootBorder = itemContainer.FindDescendant<Border>();
196+
if (rootBorder != null)
197+
{
198+
rootBorder.Background = GetAlternateColor(sender);
199+
}
195200
}
196201
else
197202
{
198203
itemContainer.Background = null;
204+
var rootBorder = itemContainer.FindDescendant<Border>();
205+
if (rootBorder != null)
206+
{
207+
rootBorder.Background = null;
208+
}
199209
}
200210
}
201211
}

0 commit comments

Comments
 (0)