更新时间:2023-01-25 17:51:21
尝试样式
属性。
可以将此代码添加到 ListView
中,然后应设置 ListViewItems
到 Brush
颜色。
One can add this code to the ListView
and then it should set the background of the ListViewItems
to the Brush
color.
<ListView>
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListViewItem}">
<Setter Property="Background" Value="{Binding Brush}" />
</Style>
</ListView.ItemContainerStyle>
...
</ListView>