/// <summary>
        /// Adds all questions in category to ListBox on pivot page.
        /// </summary>
        /// <param name="listOfQuestions">ListBox element name on pivot page to which questions should be added.</param>
        public void AddQuestionsToListBox(ListBox listOfQuestions)
        {
            foreach (Question question in _category.Questions)
            {
                Type type = question.GetType();

                UserControl questionControl = new PreviewResultControl();
                ((PreviewResultControl)questionControl).QuestionData.DataContext = question;

                if (questionControl != null)
                    listOfQuestions.Items.Add(questionControl);
            }
        }
        /// <summary>
        /// Adds all questions in category to ListBox on pivot page.
        /// </summary>
        /// <param name="listOfQuestions">ListBox element name on pivot page to which questions should be added.</param>
        public void AddQuestionsToListBox(ListBox listOfQuestions)
        {
            foreach (Question question in _category.Questions)
            {
                Type type = question.GetType();

                UserControl questionControl = new PreviewResultControl();
                ((PreviewResultControl)questionControl).QuestionData.DataContext = question;

                if (questionControl != null)
                {
                    listOfQuestions.Items.Add(questionControl);
                }
            }
        }