private static void NewCommandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ((MultiModeEditorCommandBar)d)._newButton.Command = e.NewValue as ICommand; }