public static WheelGestureData FromEventArgs(CanExecuteToolEventArgs e) { if (e == null) { throw new ArgumentNullException("e"); } return(GestureData.FromParameter <WheelGestureData>(e.Parameter)); }
internal bool OnExecute(EditingContext sender, ExecutedToolEventArgs e) { CanExecuteToolEventArgs e1 = new CanExecuteToolEventArgs((ICommand)this._command, e.Parameter); if (this.Execute == null || !this.OnCanExecute(sender, e1)) { return(false); } this.Execute((object)sender, e); return(true); }
internal bool OnCanExecute(EditingContext sender, CanExecuteToolEventArgs e) { if (this.CanExecute != null) { this.CanExecute((object)sender, e); if (!e.CanExecute) { return(false); } } return(e.CanExecute = this.Execute != null); }
public bool CanExecute(GestureData data) { if (data == null) { throw new ArgumentNullException("data"); } if (data.Context == null) { throw new ArgumentException(Resources.Error_MissingContext); } ToolCommandBinding commandBinding = this.GetCommandBinding(data); if (commandBinding == null) { return(false); } CanExecuteToolEventArgs e = new CanExecuteToolEventArgs((ICommand)this, (object)data); return(commandBinding.OnCanExecute(data.Context, e)); }