如何将一些源代码放入Array
名为 WPF 控件的源代码中Image
?我找到了这个论坛,但是如何制作数组?
BitmapImage logo = new BitmapImage()
logo.BeginInit();
logo.UriSource = new Uri("pack://application:,,,/img/3.jpg");
logo.EndInit();
tmpimage.Source = logo;
但我需要这样的东西:
Image[] img = new Image[3];
img[0].Source = new Uri("pack://application:,,,/img/3.jpg");
tmpimage.Source = img[0];