I am trying to make a visible image array in C# for windows phone 7.
I do:
Image[] stone = new Image[100];
public Game() //constructor
{
InitializeComponent();
stone[0] = new Image();
BitmapImage bi = new BitmapImage();
bi.SetSource(Application.GetResourceStream(new Uri(@"notselected.png", UriKind.Relative)).Stream);
stone[0].Source = bi;
stone[0].Width = 200;
stone[0].Height = 200;
stone[0].Opacity = 1.0;
}
It compiles, but it doesn’t show the image. What should I do?
You have to add the images to a control in your page, eg a grid or stackpanel: