如何将System.Windows.Media.Brush转换为System.Drawing.Brush?我正在尝试获取格式化为System.Drawing.Color对象的system.windows.media.brush的颜色。下面的解决方案不起作用,因为它需要一个solidcolorbrush对象,而我需要转换的对象是一个system.windows.media.brush对象:
public System.Drawing.Color
procedure TForm1.Button4Click(Sender: TObject); If (shape1.Brush.Color:=clblue and shape2.Brush.ColorshowMessage('error');begin
If (shape1.Brush.Color:=clblue) and (shape2.Brush.Color:=cl
), typeof(Key), new FrameworkPropertyMetadata(Brushes.LightSlateGray)); get return (Brush)GetValue(BrushNormalProperty);), typeof(Key), new FrameworkPropertyMetadata(Brushes.LightSteelBlue));
public