I have a ListView where one element of the Collection is a color and the element is called "ItemColor" (of type Color). I want to set a given ListViewItem to be that color.
No matter what I try, I can't get this to work. In the example below, the Background is being set to a static color, but I want this to be something like Value= Binding(ItemColor) and the background of that item to show as being that color.
Any help appreciated.Code:<ListView.ItemContainerStyle> <Style TargetType="ListViewItem"> <Style.Triggers> <DataTrigger Binding="{Binding Path=RowSelected}" Value="True"> <Setter Property="Background" Value="Gainsboro" /> <Setter Property="FontWeight" Value="Bold" /> </DataTrigger> </Style.Triggers> </Style> </ListView.ItemContainerStyle>




Reply With Quote