private void MainContent_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { var owner = sender as FrameworkElement; bool isInArea = false; switch (this.DrawerLocation) { case DrawerLocation.Left: isInArea = e.Position.X < this.TouchTargetThreshold; break; case DrawerLocation.Right: isInArea = e.Position.X > owner.ActualWidth - this.TouchTargetThreshold; break; case DrawerLocation.Top: isInArea = e.Position.Y < this.TouchTargetThreshold; break; case DrawerLocation.Bottom: isInArea = e.Position.Y > owner.ActualHeight - this.TouchTargetThreshold; break; } if (isInArea) { this.DrawerState = Primitives.DrawerState.Moving; this.Context.MainContentStoryBoard.Begin(); this.Context.MainContentStoryBoard.Pause(); this.Context.DrawerStoryBoard.Begin(); this.Context.DrawerStoryBoard.Pause(); this.shouldAnimate = true; } }
private static void FrameworkElement_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { if (PointerDeviceType.Touch.Equals(e.PointerDeviceType)) { System.Diagnostics.Debug.WriteLine($"FrameworkElement_ManipulationStarted{e.Position.X},{e.Position.Y}"); } }
private void OnColorPointVisualDragStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { if (sender is ColorPointVisual visual) { visual.IsSelected = true; } FrameworkElement element = e.OriginalSource as FrameworkElement; if (element == null) { return; } var bounds = element.GetBoundsRelativeTo(this); if (bounds == null) { return; } var position = new Point(bounds.Value.X + bounds.Value.Width / 2, bounds.Value.Y + bounds.Value.Height / 2); OnColorPointVisualDragStarted(sender as ColorPointVisual, position); }
private void AssociatedObject_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { NowSwiping = true; _IsSkipSwipe = false; // 画面端の遊びチェック bool isOutOfEdgeBounce = false; var play = SwipeEdgeOfPlay; if (e.Container is FrameworkElement) { var fe = e.Container as FrameworkElement; var width = fe.ActualWidth; var height = fe.ActualHeight; Rect swipeRect = new Rect(play.Left, play.Top, width - play.Right - play.Left, height - play.Bottom - play.Top); if (!swipeRect.Contains(e.Position)) { isOutOfEdgeBounce = true; System.Diagnostics.Debug.WriteLine("Swipe out of bounce"); } } if (!isOutOfEdgeBounce) { InitializeSwipe(e.Cumulative); e.Handled = true; } else { _IsSkipSwipe = true; } }
/// <summary> /// save pointer state from ManipulationStartedRoutedEventArgs /// </summary> /// <param name="e"></param> /// <returns></returns> public static PointerState _(Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e, object sender, string remarks) { var ret = new PointerState { Sender = sender, Remarks = remarks, PositionOrigin = ScreenPos.From(e.Position.X, e.Position.Y), Position = ScreenPos.From(e.Position.X, e.Position.Y), IsInContact = true, Scale = e.Cumulative.Scale, Rotation = Angle.FromDeg(e.Cumulative.Rotation), Time = DateTime.Now, }; switch (e.PointerDeviceType) { case PointerDeviceType.Pen: ret.DeviceType = PointerState.DeviceTypes.Pen; break; case PointerDeviceType.Touch: ret.DeviceType = PointerState.DeviceTypes.Touch; break; case PointerDeviceType.Mouse: ret.DeviceType = PointerState.DeviceTypes.Mouse; break; } return(ret); }
private void LayoutController_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { if (!_manipulationsEnabled) { return; } SplitviewLayer.Width = LayoutController.Width; }
private void Rating_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { if (!ReadOnly) { PerformValueCalculation(e.Position, e.Container); UpdateDragHelper(); } }
private void Drawer_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { this.DrawerState = Primitives.DrawerState.Moving; this.shouldAnimate = true; this.Context.MainContentStoryBoardReverse.Begin(); this.Context.MainContentStoryBoardReverse.Pause(); this.Context.DrawerStoryBoardReverse.Begin(); this.Context.DrawerStoryBoardReverse.Pause(); }
public UwpLongPressEventArgs(FrameworkElement element, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs args, long elapsedMilliseconds) { ElementPosition = element.GetXfViewFrame(); var point = args.Position; ElementTouches = new Xamarin.Forms.Point[] { point.ToXfPoint() }; WindowTouches = new Xamarin.Forms.Point[] { element.PointInNativeAppWindowCoord(point).ToXfPoint() }; Duration = elapsedMilliseconds; }
private void TimelinePanel_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { if (IsLocked) { return; } _manipulating = true; _originalIndex = ItemIndex; }
private void GestureRect_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { VisualStateManager.GoToState(this, "Swiping", true); if (ContentGridTrans != null) { ContentGridTrans.X = 0; } if (ShadowVisual != null) { ShadowVisual.IsVisible = true; } }
void behavior_ElementManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { //get max z-index int maxzindex = Items.Select(x => Canvas.GetZIndex(this.ContainerFromItem(x) as UIElement)).Max(); DependencyObject parent = VisualTreeHelper.GetParent(sender as UIElement); if (parent is Grid) { (sender as UIElement).SetValue(Canvas.ZIndexProperty, ++maxzindex); } else //ContentPresenter { parent.SetValue(Canvas.ZIndexProperty, ++maxzindex); } }
private void LaunchPokeballButton_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { Logger.Write("Manipulation Started..."); // Show the ball a little bigger when held PokeballTransform.ScaleX *= 1.05f; PokeballTransform.ScaleY *= 1.05f; // Store this so that we can revert back to this poition InitItemX = (float)PokeballTransform.TranslateX; InitItemY = (float)PokeballTransform.TranslateY; PastPositions.Clear(); PastPositions.Enqueue(new Tuple <Vector3, DateTime>( new Vector3(InitItemX, InitItemY, 0), DateTime.Now )); }
void ImageSwitch_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { this.ManipulationDelta += ImageSwitch_ManipulationDelta; }
private void Sv_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { currentX = e.Position.X; currentY = e.Position.Y; }
private void SwapChainBackgroundPanel_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { // TODO: Add event handler implementation here. int a = 0; }
private void Page_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { initialPoint = e.Position; }
private void Grid_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { Debug.WriteLine("Manipulation Started : " + e.Position.X.ToString()); initialpoint = e.Position; }
private void OnListViewItemManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { _initialpoint = e.Position; }
private void RelativePanel_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { }
protected override void OnManipulationStarted(Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { //base.OnManipulationStarted(e); }
private void BoxExRenderer_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { var el = this.Element as BoxViewEx; el.OnManipulationStarted(el, new PazzleDrag.ManipulationStartedRoutedEventArgs()); }
public UwpLongPressEventArgs(Windows.UI.Xaml.FrameworkElement element, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs args, long elapsedMilliseconds) { ViewPosition = element.GetXfViewFrame(); Touches = new Xamarin.Forms.Point[] { args.Position.ToXfPoint() }; Duration = elapsedMilliseconds; }
private void SlidePanel_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { _prePoint = e.Position; }
private static void obj_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { Rotate((UIElement)sender, 30, 0, false); }
private void LayoutRoot_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { }
/// <summary> /// Called before the ManipulationStarted event occurs. /// </summary> /// <param name="e">Event data for the event.</param> protected override void OnManipulationStarted(Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { base.OnManipulationStarted(e); Debug.WriteLine("Manipulation started."); }
void Control_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { // e.ManipulationOrigin }