views:

57

answers:

1

I am writing a Silverlight application. How do I generate 2 pictures from an array of images and display it on my screen?

This is what I have now.

private void PopulateCards(object sender, RoutedEventArgs e)
{
    List<string> Level2 = new List<string> { "1", "2", "3" };

    List<string> randomizedImageList = GetRandomList(Level2);

    for (int i = 0; i < randomizedImageList.Count; i++)
    {
        Picture currentCard = PictureGrid.Children[i] as Picture;
        currentCard.MouseLeftButtonUp += new MouseButtonEventHandler(CardClicked);
        currentCard.Tag = randomizedImageList[i];          
        currentCard.photo.Source = new BitmapImage(new Uri("/LogIn;Component/Image/" + randomizedImageList[i] + ".jpg", UriKind.Relative));
    }
} 
A: 

I'm building a Silverlight application. I want to display 2 images randomly from an array on the screen. This is what I have now.

boyboy
-1 This isn't an answer to the question. Instead of posting this as an answer you should edit your question and put this information in the question.
Mark Byers
If you want to provide extra information, you should edit your question with it. Don't "answer" unless you've actually solved your problem.
Will Vousden
oh sorry my bad. Im still new to this forum
boyboy
@boyboy - I've edited the question. You should delete this answer. It will only serve to discourage other people from answering the question as they may assume you already have the answer.
Mark Byers