Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

URGENT ! How to set listview color background?

$
0
0
<ListView Margin="6,6,55,6"
                                      Name="listViewLegend" 
                                      Foreground="#FF0C0D0D" 
                                      Background="White" 
                                      ItemsSource="{Binding}"><ListView.View><GridView><GridViewColumn Header="Joint Name" DisplayMemberBinding="{Binding JointName}"/><GridViewColumn Header="Joint Color"><GridViewColumn.CellTemplate><DataTemplate><Grid Background ="White"><TextBlock Text="{Binding JointColor}"/><Grid Background="Khaki"><TextBlock Text="{Binding JointColor}"/></Grid></Grid></DataTemplate></GridViewColumn.CellTemplate></GridViewColumn></GridView></ListView.View><ListView.ItemContainerStyle><Style TargetType="ListViewItem"><Setter Property="HorizontalContentAlignment" Value="Stretch"/></Style></ListView.ItemContainerStyle></ListView>

The code above only able to show this

I need the color to be shown according to the Color that I have stated in the column.

Someone please help .

Thanks !!


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>