zl程序教程

您现在的位置是:首页 >  后端

当前栏目

wpf Image背景图

WPF Image 背景图
2023-09-14 09:10:47 时间
1.代码加载
BitmapImage img = new BitmapImage(new Uri(file.LocalPath, UriKind.RelativeOrAbsolute));
FileImage.Source = img;
2.xaml设置
<Image  x:Name="FileImage" Grid.Row="2"  Source="D:\\1.png"  Width="600" Height="400" />