Skip to content

Commit

Permalink
Fix issue with Windows 11 ListViewStyle
Browse files Browse the repository at this point in the history
Copy of existing PR
  • Loading branch information
TopperDEL authored Nov 22, 2024
1 parent cd19f55 commit 405c427
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,20 @@ private static void SetItemContainerBackground(ListViewBase sender, Control item
if (itemIndex % 2 == 0)
{
itemContainer.Background = GetAlternateColor(sender);
var rootBorder = itemContainer.FindDescendant<Border>();
if (rootBorder != null)
{
rootBorder.Background = GetAlternateColor(sender);
}
}
else
{
itemContainer.Background = null;
var rootBorder = itemContainer.FindDescendant<Border>();
if (rootBorder != null)
{
rootBorder.Background = null;
}
}
}
}

0 comments on commit 405c427

Please sign in to comment.