private void command_CanExecuteChanged(object sender, EventArgs e) { if (command != null) { IsEnabled = command.CanExecute(null); } }
private void ExecuteButtonCommand(object sender, EventArgs e, DialogButton button) { if (button != null) { if (!string.IsNullOrEmpty(button.Command)) { ICommandCore command = ApplicationManager.Current.CommandStore[button.Command]; if (command != null) { if (command.CanExecute(null)) { command.Execute(null); } } } } DialogClosing(sender, e); }