private void TabControl_SelectionChanged(object sender, SelectionChangedEventArgs e) { TabControl.SelectedIndex = TabControl.SelectedIndex < 0 ? 0 : TabControl.SelectedIndex; QuizViewModelFactory.CreateInstnce().QuestionType = (TabControl.SelectedItem as TabItem).Header.ToString(); }
public QuizView() { InitializeComponent(); this.DataContext = QuizViewModelFactory.CreateInstnce(); }