2012-04-03 38 views

Trả lời

12

Sử dụng ImageBrush để thiết lập thuộc tính Canvas.Background

ImageBrush ib = new ImageBrush(); 
ib.ImageSource = new BitmapImage(new Uri(@"sampleImages\berries.jpg", UriKind.Relative)); 
mycanvas.Background = ib;