public HoldGestureEngine ( System.TimeSpan timeout, double maxMovement ) : System | ||
timeout | System.TimeSpan | The time that the user must keep the touch pressed in order for it to be considered a hold gesture. |
maxMovement | double | The maximum movement the user is allowed to move the touch point in order for it to still be considered a hold gesture. Unit is WPF device independent pixels |
return | System |
public HoldGestureEngine(TimeSpan timeout, double maxMovement)
{
if (maxMovement < 0)
maxMovement = Double.MaxValue;
_maxMovement = maxMovement;
_timer = new DispatcherTimer();
_timer.Interval = timeout;
_timer.Tick += (s, ee) =>
{
ProcessStatus();
};
}