You can use AlternationIndex and AlternationCount properties.
Following example sets different background color for first three rows.
Add this style definition to your UserControl (or Window):
<Style TargetType="ListViewItem">
<Style.Triggers>
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
<Setter Property="Background" Value="#FFFF0000" />
</Trigger>
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
<Setter Property="Background" Value="#FF00FF00" />
</Trigger>
<Trigger Property="ItemsControl.AlternationIndex" Value="2">
<Setter Property="Background" Value="#FF0000FF" />
</Trigger>
</Style.Triggers>
</Style>
Set AlternationCount of ListView to value which is greater than number of rows that ListView can actually contain:
<ListView AlternationCount="1000" />
Reference:
ItemsControl.AlternationCount Property