using System.Windows; namespace PettingZoo.Tapeti.UI.ClassSelection { /// /// Interaction logic for ClassSelectionWindow.xaml /// public partial class ClassSelectionWindow { private readonly ClassSelectionViewModel viewModel; public ClassSelectionWindow(ClassSelectionViewModel viewModel) { this.viewModel = viewModel; DataContext = viewModel; InitializeComponent(); } private void TreeView_OnSelectedItemChanged(object sender, RoutedPropertyChangedEventArgs e) { viewModel.SelectedItem = (BaseClassTreeItem)e.NewValue; } } }