c# - Convert System.Windows.Media.Brush to System.Drawing.Brush -
How can I convert a system. Windows Media. System system Drawing Brush?
I am trying to get the color of a system. Windows.media.brush was formatted in a system. Drawing.Color Object.
The following solution does not work because it requires a solid color object, while the object I need to change is a system.windows. Media. Brush object:
public system. Drawing Caller GateColor (System. Windows Media, Solid Coulobrish Obrish) {Return System. Drawing Color .FromArgb (oBrush.Color.A, oBrush.Color.R, oBrush.Color.G, oBrush.Color.B); }
I believe that you get it to be a solid coiler Can put in the form of a brush. / P>
Try doing something like this:
MyColor = ((SolidColorBrush) MyMediaBrush). Colour;
Comments
Post a Comment