//开始创建一个名叫she的空间
//用haiyang把图片装起来
ImageBrush haiyang = new ImageBrush();
Uri xuri = new Uri("图片路径", UriKind.Absolute);
haiyang.ImageSource = new BitmapImage(xuri);
//将haiyang添加到she中
she.Background = haiyang;
wpf中用代码添加图片
最新推荐文章于 2024-09-13 10:14:28 发布