WPF listview 隔行换色 文字居中
作者:互联网
<ListView x:Name="lstViewResult" Margin="0" AlternationCount="2" BorderBrush="{x:Null}" Foreground="Black" FontSize="10.5"> <ListView.ItemContainerStyle> <Style TargetType="{x:Type ListViewItem}"> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Style.Triggers> <Trigger Property="ListView.AlternationIndex" Value="1"> <Setter Property="Background" Value="#FFEDEDED"/> </Trigger> </Style.Triggers> </Style> </ListView.ItemContainerStyle> <ListView.View> <GridView> <GridViewColumn/> </GridView> </ListView.View> </ListView>
标签:居中,文字,隔行,换色,WPF,listview 来源: https://www.cnblogs.com/guangzhiruijie/p/16516951.html