locked
how to navigate xaml page in random way? RRS feed

  • Question

  •  Frame[] frame = new Frame[3] { new Frame(), new Frame(), new Frame() };
     frame[0] = Frame.Navigate(typeof(Question));

    i try this code that is randoming a images of array. how can i navigate to a page randomly?

    Sunday, February 2, 2014 2:01 PM

Answers

  • You can use the System.Random() class to pick a random index into your questions array and navigate to that page.

    --Rob

    Wednesday, February 5, 2014 4:04 AM
    Moderator

All replies

  • Can you please explain more clearly what you are trying to do?

    --Rob

    Sunday, February 2, 2014 4:36 PM
    Moderator
  • example

    MainPage.xaml
    Question1.xaml
    Question2.xaml
    Question3.xaml

    i am in mainpage when i click the button from xaml page it will random navigate to question1 or question2 or question3.xaml 

    Sunday, February 2, 2014 4:49 PM
  • You can use the System.Random() class to pick a random index into your questions array and navigate to that page.

    --Rob

    Wednesday, February 5, 2014 4:04 AM
    Moderator