From 405c427afa679d84219b1d6132240bd2cac517d5 Mon Sep 17 00:00:00 2001 From: TopperDEL Date: Fri, 22 Nov 2024 10:59:17 +0100 Subject: [PATCH] Fix issue with Windows 11 ListViewStyle Copy of existing PR --- .../ListViewBase/ListViewExtensions.AlternateRows.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/components/Extensions/src/ListViewBase/ListViewExtensions.AlternateRows.cs b/components/Extensions/src/ListViewBase/ListViewExtensions.AlternateRows.cs index 65ef5340..1e73c325 100644 --- a/components/Extensions/src/ListViewBase/ListViewExtensions.AlternateRows.cs +++ b/components/Extensions/src/ListViewBase/ListViewExtensions.AlternateRows.cs @@ -192,10 +192,20 @@ private static void SetItemContainerBackground(ListViewBase sender, Control item if (itemIndex % 2 == 0) { itemContainer.Background = GetAlternateColor(sender); + var rootBorder = itemContainer.FindDescendant(); + if (rootBorder != null) + { + rootBorder.Background = GetAlternateColor(sender); + } } else { itemContainer.Background = null; + var rootBorder = itemContainer.FindDescendant(); + if (rootBorder != null) + { + rootBorder.Background = null; + } } } }