/// <summary> /// Common method to create the question text. /// </summary> private void CreateQuestionText(SurveyQuestion question, Panel view) { var printTextBlock = new TextBlock { Text = question.GetTextByLanguage("en") }; view.Children.Add(printTextBlock); }
private void PrintComboboxAnswers(SurveyQuestion question, StackPanel view) { var selectQuestion = (SelectSurveyQuestion)question; var comboBox = new ComboBox(); foreach (var answer in selectQuestion.Answers) { comboBox.Items.Add(new ComboBoxItem { Content = answer.GetTextByLanguage("en") }); } view.Children.Add(comboBox); }
private void PrintRangeAnswers(SurveyQuestion question, StackPanel view) { var numericQuestion = (NumericSurveyQuestion)question; var slider = new Slider { SelectionStart = numericQuestion.From, SelectionEnd = numericQuestion.To, TickFrequency = 1, TickPlacement = TickPlacement.Both }; view.Children.Add(slider); }
private void PrintCheckboxAnswers(SurveyQuestion question, StackPanel view) { var selectQuestion = (SelectSurveyQuestion)question; foreach (var answer in selectQuestion.Answers) { view.Children.Add(new CheckBox { Content = answer.GetTextByLanguage("en"), IsChecked = answer.IsSelected }); } }