Skip to content

Commit da3ce4f

Browse files
committed
Rewrote without null conditional assignment
1 parent 2954509 commit da3ce4f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ private static void SetItemContainerBackground(ListViewBase sender, Control item
194194
var rootBorder = itemContainer.FindDescendant<Border>();
195195

196196
itemContainer.Background = brush;
197-
rootBorder?.Background = brush;
197+
if (rootBorder is not null)
198+
{
199+
rootBorder.Background = brush;
200+
}
198201
}
199202
}

0 commit comments

Comments
 (0)