private static void SpellGroupChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SpellGroupUserControl ctrl = d as SpellGroupUserControl; ctrl.grid.DataContext = e.NewValue; ctrl.spellsItemsControl.ItemsSource = e.NewValue as ObservableCollection <Spell>; }
private static void SpellGroupNameChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SpellGroupUserControl ctrl = d as SpellGroupUserControl; ctrl.nameTextBox.Text = e.NewValue as string; }