1
0
mirror of synced 2024-11-15 09:43:50 +00:00
PettingZoo/PettingZoo.Tapeti/UI/ClassSelection/ClassSelectionWindow.xaml.cs

28 lines
692 B
C#
Raw Normal View History

using System.Windows;
namespace PettingZoo.Tapeti.UI.ClassSelection
{
/// <summary>
/// Interaction logic for ClassSelectionWindow.xaml
/// </summary>
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<object> e)
{
viewModel.SelectedItem = (BaseClassTreeItem)e.NewValue;
}
}
}