Winforms - How to alternate the color of rows in a ListView control?
.net-3.5, c#, listview, winforms
Solution
I'm afraid that is the only way in Winforms. XAML allows this through use of styles though.
Problem
Using C# Winforms (3.5). Is it possible to set the row colors to automatically alternate in a listview? Or do I need to manually set the row color each time a new row is added to the listview? Based on a MSDN article the manual method would look like this: ``` //alternate row color if (i % 2 == 0) { lvi.BackColor = Color.LightBlue; } else { lvi.BackColor = Color.Beige; } ```