protected virtual bool ExecuteCommand(ExecuteReason reason) { // 简单检查当前状态 if (!this.IsKeyboardFocusWithin) { return(false); } if (Command == null) { return(false); } // 已经结束的情况下,自动停止定时器 if (reason >= ExecuteReason.CanLostFocus) { StartAutoCommitTimer(0); } // 执行命令 Command.Execute(new ExecuteParameter(this, CommandParameter, reason)); return(true); }
public ExecuteParameter(CommandComboBox source, object parameter, ExecuteReason reason) { this.Source = source; this.CommandParameter = parameter; this.Reason = reason; }
public ExecuteRoutedEventArgs(ExecuteReason reason) { Reason = reason; }