locked
Using one xaml page for multiple questions

    Question

  • Hello

    I am developing a quiz application with multiple choice questions and there are fifty (50) questions in all
    I have created a UI for it containing question, four radio buttons and next button to move to the next question on the xaml page
    Instead of creating fifty (50) xaml pages for each question, how can i use one (1) xaml page for all the fifty (50) questions by
    loading the questions from the code whenever the user move to the next question using only one xaml page for all the questions

    Regards


    Jayjay john

    Saturday, October 11, 2014 9:08 PM

Answers

  • Thank you for the reply, i will try this method

    Jayjay john

    • Marked as answer by Joakins Wednesday, October 15, 2014 3:20 PM
    Monday, October 13, 2014 8:47 PM

All replies

  • Hi Jayjay,

    How about using Binding for your data? Take a look at the documentation: Quickstart: Data binding to controls and  Data binding with XAML.

    Try to create a series of data in the backend and binding them to the frontend xaml, for instance if user is working on the first question, you should bind the first question content to the xaml, if user finished the question, you can then bind the second question content to the xaml.

    MVVM could be a really great thing for your scenario if you interested in it, ref: Use the Model-View-ViewModel (MVVM) pattern.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Monday, October 13, 2014 1:24 AM
    Moderator
  • Thank you for the reply, i will try this method

    Jayjay john

    • Marked as answer by Joakins Wednesday, October 15, 2014 3:20 PM
    Monday, October 13, 2014 8:47 PM