方法一:
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;

相关文章:

  • 2022-12-23
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2022-01-30
猜你喜欢
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2021-07-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案