2010-05-05 110 views

回答

6

您必須使用Converter將字符串轉換爲畫筆對象。在框架中有一個BrushConverter來做到這一點。

BrushConverter converter = new BrushConverter(); 
BorderBrush brush = converter.ConvertFromString("#FFBCC7D8") as Brush; 
((Border)((Image)sender).Parent).BorderBrush = brush; 
相關問題