方法一:
xaml中:
<控件>
<控件.Background>
<ImageBrush ImageSource="/程序集;component/images/xxx.jpg"/>
</控件.Background>
</控件>
方法二:
xx.cs中:
ImageBrush ib = new ImageBrush();
ib.ImageSource = new BitmapImage(new Uri(图片路径, UriKind.RelativeOrAbsolute));
控件名.Background = ib;