kartal kartal - 1 year ago 267
C# Question

convert from Color to brush

How do I convert a

to a
in C#?

Answer Source

This is for Color to Brush....

you can't convert it, you have to make a new brush....

SolidColorBrush brush = new SolidColorBrush( myColor );

now, if you need it in XAML, you COULD make a custom value converter and use that in a binding

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download