System.Windows.Media.BrushをSystem.Drawing.Brushに変換するにはどうすればよいですか?
System.Drawing.Colorオブジェクトにフォーマットされたsystem.windows.media.brushの色を取得しようとしています。
以下のソリューションは、solidcolorbrushオブジェクトが必要なため機能しませんが、変換が必要なオブジェクトはsystem.windows.media.brushオブジェクトです。
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 );
}