/// <summary> /// Invoke the pinching event. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The pinch event.</param> internal void InvokePinching(View sender, PinchEvent e) { Pinching?.Invoke(sender, new PinchEventArgs(e)); if (e.State == GestureState.Ended && Command is ICommand cmd && cmd.CanExecute(CommandParameter)) { cmd.Execute(CommandParameter); } }
/// <summary> /// Initializes a new instance of the <see cref="PinchEventArgs"/> class. /// </summary> /// <param name="e">The pinch event.</param> internal PinchEventArgs(PinchEvent e) { State = e.State; Scale = e.Scale; Origin = e.Origin; }