示例#1
0
 internal HoldingRoutedEventArgs(UIElement originalSource, HoldingEventArgs args)
     : base(originalSource)
 {
     _originalSource   = originalSource;
     _position         = args.Position;
     PointerId         = args.PointerId;
     PointerDeviceType = args.PointerDeviceType;
     HoldingState      = args.HoldingState;
 }
示例#2
0
        private void Recognizer_Holding(GestureRecognizer sender, HoldingEventArgs args)
        {
            if (args.HoldingState == HoldingState.Started)
            {
                if (_pointer != null)
                {
                    CapturePointer(_pointer);
                }

                var children = VisualTreeHelper.FindElementsInHostCoordinates(args.Position, this);
                var selector = children?.FirstOrDefault(x => x is SelectorItem) as SelectorItem;
                if (selector != null)
                {
                    VisualStateManager.GoToState(selector, "Normal", false);

                    OnItemHolding(selector, selector.Tag);
                }
            }
        }
示例#3
0
 void gestureRecognizer_Holding(GestureRecognizer sender, HoldingEventArgs args)
 {
     if (Hold != null && CanHolding)
     {
         if (args.HoldingState == HoldingState.Started)
         {
             PressProgressBar.Visibility = Visibility.Visible;
             if (!_isAnimateBegin)
             {
                 _isAnimateBegin = true;
                 PressStoryBoard.Begin();
             }
         }
         else
         {
             _isAnimateBegin = false;
             PressStoryBoard.Stop();
             PressProgressBar.Visibility = Visibility.Collapsed;
         }
     }
 }
示例#4
0
 private void GestureRecognizer_Holding(GestureRecognizer sender, HoldingEventArgs args)
 {
     System.Diagnostics.Debug.WriteLine("Holding " + args);
 }
 private void OnGestureRecognizerHolding(GestureRecognizer sender, HoldingEventArgs args)
 {
     GestureRecognizerHolding?.Invoke(this, args);
 }
 void gestureRecognizer_Holding(GestureRecognizer sender, HoldingEventArgs args)
 {
     MyTextBlock.Text = "Hello";
 }
 HoldingState IHoldingEventArgsResolver.HoldingState(HoldingEventArgs e) => e.HoldingState;
 uint IHoldingEventArgsResolver.CurrentContactCount(HoldingEventArgs e) => e.CurrentContactCount;
 PointerDeviceType IHoldingEventArgsResolver.PointerDeviceType(HoldingEventArgs e) => e.PointerDeviceType;
示例#10
0
 Point IHoldingEventArgsResolver.Position(HoldingEventArgs e) => e.Position;
示例#11
0
 /// <summary>
 /// Gets the current number of contact points for the ongoing <see cref="GestureRecognizer.Holding"/> event.
 /// </summary>
 /// <param name="e">The requested <see cref="HoldingEventArgs"/>.</param>
 /// <returns>The number of contact points.</returns>
 public static uint CurrentContactCount(this HoldingEventArgs e) => Resolver.CurrentContactCount(e);
示例#12
0
 /// <summary>
 /// Gets the state of the Holding event.
 /// </summary>
 /// <param name="e">The requested <see cref="HoldingEventArgs"/>.</param>
 /// <returns>State of the Holding event.</returns>
 public static HoldingState HoldingState(this HoldingEventArgs e) => Resolver.HoldingState(e);
示例#13
0
 /// <summary>
 /// Gets the location of the touch, mouse, or pen/stylus contact.
 /// </summary>
 /// <param name="e">The requested <see cref="HoldingEventArgs"/>.</param>
 /// <returns>The screen coordinates, in device-independent pixel (DIP).</returns>
 public static Point Position(this HoldingEventArgs e) => Resolver.Position(e);
示例#14
0
 /// <summary>
 /// Gets the device type of the input source.
 /// </summary>
 /// <param name="e">The requested <see cref="HoldingEventArgs"/>.</param>
 /// <returns>The device type.</returns>
 public static PointerDeviceType PointerDeviceType(this HoldingEventArgs e) => Resolver.PointerDeviceType(e);
 private void GestureRecognizer_Holding(GestureRecognizer sender, HoldingEventArgs args)
 {
     TxtGestureNotes.Text = "Gesture Holding";
 }