方法一:
xaml中:
<控件>   
<控件.Background>
<ImageBrush ImageSource="/WpfApplication1;component/Images/xxx.jpg"/>
</控件.Background>
</控件>   

方法二:
xxxx.cs中:
ImageBrush b3 = new ImageBrush();
b3.ImageSource = new BitmapImage(new Uri(path, UriKind.RelativeOrAbsolute));
this.Background = b3;

相关文章:

  • 2022-02-02
  • 2022-01-18
  • 2021-07-07
  • 2021-08-15
  • 2021-09-25
  • 2021-09-05
猜你喜欢
  • 2022-12-23
  • 2021-07-29
  • 2022-12-23
  • 2022-12-23
  • 2021-08-13
  • 2022-12-23
  • 2021-12-27
相关资源
相似解决方案