How can I convert System.Windows.Media.Brush to System.Drawing.Brush?
I am trying to get the color system.windows.media.brush formatted in a System.Drawing.Color object.
The solution below does not work because it requires a solidcolorbrush object, whereas the object I need to convert is the system.windows.media.brush object:
public System.Drawing.Color GetColor( System.Windows.Media.SolidColorBrush oBrush ) { return System.Drawing.Color.FromArgb( oBrush.Color.A, oBrush.Color.R, oBrush.Color.G, oBrush.Color.B ); }
c #
stormist
source share