Create Quiz-type application... RRS feed

  • General discussion

  • Hi,

    I'm looking to create a simple quiz-type application using Silverlight for Windows Phone.

    I was working on it in the last few days, but I didn't do it very well. Here's how I did it:

    I have over a hundred pages (Page1.xaml, Page2.xaml ....). Each one of them is a different question, with four select-able answers (where one is correct).

    Here's how I would like to do it:

    I would like to have one page with different text. It's hard to explain but I would like something like: Page1.xaml?questionID=1, Page1.xmal?questionID=2
    And the questionID tells the app what text to display.

    Now, what would be the best way to implement this. I don't mind starting again, I didn't spend that much time on this anyway.
    Sunday, June 12, 2011 10:24 AM

All replies

  • Do you have any familiarity with MVVM or DataBinding in Silverlight? If not then you will want to start will learning about those.

    Using data binding you would only need to load your question and four answers into a few properties (variables) and allow the data binding to take care of appropriately updating the screen. Also if your questions were stored in an XML file then your query parameter could be used to retrieve the needed node with the questions and answers from that file. If you are planning to release your application post Mango then you also have the option of storying your information in a database. 
    Sunday, June 12, 2011 5:26 PM