如何在c#中設置網格的背景圖像(後面的代碼)。silverlight grid background
謝謝 Sp 我可以這樣做嗎?
public ImageSource ImageSourcePin
{
set { this.DreamTypeImagePin.Background = value; }
}
這工作,感謝您的幫助
public String ImageSourcePin
{
set {
ImageBrush img = new ImageBrush();
img.ImageSource = (ImageSource)new ImageSourceConverter().ConvertFromString(value);
DreamTypeImagePin.Background = img;
}
}
如果您希望XAML進行代碼隱藏轉換。你可以試試這個。 http://xamlt.com/這可能很方便。 – 2010-09-15 18:28:01