Blake.NUI.WPF.Gestures.TapGestureEngine.TrackTouchDown C# (CSharp) Method

TrackTouchDown() public method

public TrackTouchDown ( Point position, System.DateTime timestamp ) : void
position Point
timestamp System.DateTime
return void
    public void TrackTouchDown(Point position, DateTime timestamp)
    {
      if (IsCompleted || IsAborted)
        return;

      this.TouchDownTime = timestamp;
      this.StartPoint = position;
      IsStarted = true;

      OnGestureStarted();

      _timer.Start();
    }

Usage Example

        public void TrackTouchDown(Point position, DateTime timestamp)
        {
            if (IsCompleted || IsAborted)
            {
                return;
            }

            if (!firstTap.IsStarted)
            {
                firstTap.TrackTouchDown(position, timestamp);

                IsStarted = true;
                OnGestureStarted();
            }
            else if (!secondTap.IsStarted)
            {
                Vector delta = position - firstTap.EndPoint;
                if (delta.Length > _maxMovement)
                {
                    AbortGesture();
                    return;
                }

                _timer.Stop();
                secondTap.TrackTouchDown(position, timestamp);
            }
            else
            {
                AbortGesture();
            }
        }