Hi all,
I'm doing :
<ListView Margin="34,42,42,25" Name="listView1">
<ListView.View>
<GridView>
<GridViewColumn Width="550" Header="Value" DisplayMemberBinding="{Binding Path=MyValue}"/>
</GridView>
</ListView.View>
<ListView.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="Green"/>
</Style>
</ListView.Resources>
</ListView>
and this is working, I can see my items in Green.
Now, I want to use a binding value with this, so I have a property :
private Color _theColor;
public System.Windows.Media.Color TheColor
{
get { return _theColor; }
set
{
if (_theColor != value)
{
_theColor = value;
OnPropertyChanged("TheColor");
}
}
}
but If I use this binding :
<Setter Property="Foreground" Value="{Binding Path=TheColor}"/>
It's not working...
How can I correct that ?
Of course, I'm setting the TheColor to Colors.Green
...
Thanks for your help