2
我將System.Media.Brush轉換爲System.Drawing.Brush,但在更改顏色後。它會在轉換器上引發「令牌無效」錯誤。C#WPF令牌在BrushConverter上無效
private Brush DrawingColorToBrush(System.Drawing.Color color)
{
Brush ret;
BrushConverter m;
m = new BrushConverter();
ret = (Brush)m.ConvertFromString(color.ToArgb().ToString("X8"));
return ret;
}
顏色從System.Windows.Forms.ColorDialog
當我已經知道正確的格式時,錯過了這一點是愚蠢的。謝謝! – John