Добрый день.
У меня класс:
public class Person
{
public string Name { get; set;}
public Brush MyColor { get; set; }
}
Делаю коллекцию. Делаю Binding к гриду:
<telerikGrid:RadGridView ItemsSource="{Binding Persons}">
<telerikGrid:RadGridView.Columns>
<telerikGrid:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="Name" Background="{Binding MyColor}"/>
</telerikGrid:RadGridView.Columns>
</telerikGrid:RadGridView>
Имя меняется, а цвет нет. Хотя если задаю цвет вручную Background="Blue", то все окрашивается нормально.
В чем может быть дело?
Good day.
I have class:
public class Person
{
public string Name { get; set;}
public Brush MyColor { get; set; }
}
I have collection by this class. I do Binding:
<telerikGrid:RadGridView ItemsSource="{Binding Persons}">
<telerikGrid:RadGridView.Columns>
<telerikGrid:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="Name" Background="{Binding MyColor}"/>
</telerikGrid:RadGridView.Columns>
</telerikGrid:RadGridView>
Name change, but no color. Although if you set the color manually Background = "Blue", then all painted normally.
What could be wrong?
What could be wrong?