Reputation: 443
i set color
e.Row.Background = new SolidColorBrush(Colors.Tomato);
but how i can set color is string? color code? D7F9C7 for example...
Upvotes: 0
Views: 235
Reputation: 17083
You can use static ColorConverter.ConvertFromString Method:
Color color = (Color)ColorConverter.ConvertFromString("#D7F9C7");
Upvotes: 1
Reputation: 1637
You can set:
Brush MyBrush = (Brush)new BrushConverter().ConvertFrom("#4CE4FF00");
Upvotes: 2