internal HoldingRoutedEventArgs(UIElement originalSource, HoldingEventArgs args) : base(originalSource) { _originalSource = originalSource; _position = args.Position; PointerId = args.PointerId; PointerDeviceType = args.PointerDeviceType; HoldingState = args.HoldingState; }
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); } } }
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; } } }
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;
Point IHoldingEventArgsResolver.Position(HoldingEventArgs e) => e.Position;
/// <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);
/// <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);
/// <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);
/// <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"; }