方法一,xaml中:
<控件> <控件.background>控件.background> 控件>
方法二,cs中:
ImageBrush bg = new ImageBrush();bg.ImageSource = new BitmapImage(new Uri(path, UriKind.RelativeOrAbsolute));this.Background = bg;
本文共 250 字,大约阅读时间需要 1 分钟。
方法一,xaml中:
<控件> <控件.background>控件.background> 控件>
方法二,cs中:
ImageBrush bg = new ImageBrush();bg.ImageSource = new BitmapImage(new Uri(path, UriKind.RelativeOrAbsolute));this.Background = bg;
转载于:https://www.cnblogs.com/sntetwt/p/10609771.html