protected virtual void OnLongPressing(LongPressEventArgs e) { AddText(LongPressInfo("Pressing", e)); AddText("********** Long pressing *******"); //var v = CrossVibrate.Current; //v.Vibration(TimeSpan.FromMilliseconds(100)); // 1 second vibration }
private string LongPressInfo(string eventName, LongPressEventArgs e) { StringBuilder sb = new StringBuilder(eventName); sb.Append($" {GetElementName(e)} for {e.Duration}ms with {e.NumberOfTouches} fingers"); AddTouches(sb, e); return(sb.ToString()); }
private void AlbumItem_LongPressed(object sender, LongPressEventArgs args) { Album album = (sender as FrameworkElement).DataContext as Album; if (args.TriggeredByTouch && AlbumsList.SelectionMode == ListViewSelectionMode.None) { ActivateSelecionMode(album); } }
public static void RaiseLongPressEvent(UIElement element, Point position, TimeSpan duration) { if (GetCancelOperation(element)) { SetCancelOperation(element, false); return; } var arg = new LongPressEventArgs(position, duration, LongPressEvent); element.RaiseEvent(arg); }
protected virtual async Task OnLongPressed(LongPressEventArgs e) { AddText(LongPressInfo("Pressed", e)); StringBuilder sb = new StringBuilder(); sb.Append($" ViewPosition: {e.ViewPosition.X:F}/{e.ViewPosition.Y:F}/{e.ViewPosition.Width:F}/{e.ViewPosition.Height:F}"); await UserDialogs.Instance.AlertAsync(sb.ToString()); if (e.Duration > 1000) { AddText("********** Letup after long touch*******"); //var v = CrossVibrate.Current; //v.Vibration(TimeSpan.FromMilliseconds(250)); // 1 second vibration } }
private void FrameWithLongPressGestureRenderer_Touch(object sender, TouchEventArgs e) { if (view == null) { return; } var handler = new LongPressEventArgs(); if (e.Event.Action == MotionEventActions.Up) { handler.LongPress = false; view.HandleLongPress(view, handler); } else if (e.Event.Action == MotionEventActions.Move || e.Event.Action == MotionEventActions.Cancel) { handler.LongPress = true; view.HandleLongPress(view, handler); } //var x = e.Handled; //var y = e.Event; }
private void CancelButton_OnLongPressed(object sender, LongPressEventArgs e) { vm.TimerStatus = false; DisplayAlert("Emergency Cancelled", "Phew! Happy you are ok - no alerts were sent!", "Dismiss"); }
protected virtual void OnLongPressed(LongPressEventArgs e) { AddText(LongPressInfo("Pressed", e)); }
protected virtual void OnLongPressed(LongPressEventArgs e) { AddText("Pressed " + GetElementName(e) + " for " + e.Duration + "ms with " + e.NumberOfTouches + " fingers"); }
void LongPress(object sender, LongPressEventArgs e) { SendPacket.sendLongPress((int)e.LocalPosition.X, (int)e.LocalPosition.Y); Console.WriteLine("LongPress at " + e.LocalPosition.ToString()); }
protected virtual void OnLongPressing(LongPressEventArgs e) { AddText("Pressing " + GetElementName(e) + " for " + e.Duration + "ms"); }
protected virtual void OnLongPressed(LongPressEventArgs e) { AddText("Pressed " + GetElementName(e) + " for " + e.Duration + "ms"); }
protected virtual void OnLongPressed(LongPressEventArgs e) { AddText("Pressed " + GetElementName(e) + " for " + e.Duration + "ms with " + e.NumberOfTouches + " fingers"); }