Getting Random Images in Windows Phone

Here's a small code which will show you to display random image from your assets folder.

List<string> pics = new List<string>()
{
"Assets/img1.png",
"Assets/img2.png",
"Assets/img3.png",
"Assets/zwp1.png",
"Assets/zwp2.png",
"Assets/zwp3.png",
"Assets/zwp4.png",
"Assets/zwp5.png"
};
Random rnd=new Random();
ImageBrush brush1 = new ImageBrush();
brush1.ImageSource = new BitmapImage(new Uri(pics[rnd.Next(0,7)],
UriKind.Relative));
img1.Source = brush1.ImageSource;