示例#1
0
 /// <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);
     }
 }
示例#2
0
 /// <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;
 }