一般使用:

Img.Image = new BitmapImage(new Uri("/Resources/列表循环_白.png", UriKind.Relative));
  • 1.

找不到时,使用:

Img.ImageSource = new BitmapImage(new Uri("pack://application:,,,/MovieDesktop;component/Resources/列表循环_白.png", UriKind.Absolute));
  • 1.

注意把Resources中的资源图片设置为始终复制-资源;


作者:꧁执笔小白꧂