private void DataListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { ListViewTemplate view = (ListViewTemplate)DataListBox.SelectedItem; if (view == null) { return; } propertyGrid.SelectedObject = view; }
private void Window_Loaded(object sender, RoutedEventArgs e) { ExpBuilder.GetData(); for (int i = 0; i < ExpBuilder.PlayerExperience.Count; i++) { ListViewTemplate template = new ListViewTemplate() { Level = i, exp = ExpBuilder.PlayerExperience[i] }; _lists.Add(template); } DataListBox.ItemsSource = _lists; }