I have a WPF Window that at loading time generate a variable number of image with this for cycle :
public Window1()
{
InitializeComponent();
int numPos = 5;
for (int i = 1; i <= numPos; i++)
{
Image imageStatus = new Image();
imageStatus.Name = "Image" + i;
statusGrid.Children.Add(imageStatus);
}
}
Now i need to access at this image from a timer that every 10 seconds change the image.Source Property of every image crested at runtime ..
How Can i do this ?
Loading
Hirendra SisodiyaPosted Apr 9, 2010, 1:52 AM
try this:
// write code on timertick event
int numPos = 5;
for (int i = 1; i <= numPos; i++)
{
Image imageStatus = new Image();
imageStatus = (Image)statusGrid.Children(i);
imageStatus.image.Source =//.......
}
thnaks
Please mark as answere if it helps