windows phone 8 - ManipulationCompleted in UniversalApps(WP8) -
I'm trying to apply the drag and drop feature. My problem is that the included event manipulation was removed very late When I take a quick step with my finger and release touch, my object is flying for about half a second. I want to prevent OnManipulationDelta really implemented when my finger has been released. Private zero UIElement_OnManipulationDelta (Object Sender, ManipulationDeltaRoutedEventArgs E) {Debug.WriteLine ("Converted"). Var element = e.OriginalSource FrameworkElement; If (element! = Null) {transform transform = element. Reader Transforms Transform; If (conversion! = Zero) {transform.X + = e.Delta.Translation.X; }}}
Try Touch_FrameReported.
is a low level method and small land is over and very accurate:
Example:
Private Zero UserControl_Loaded (object sender, RoutedEventArgs e) {Touch.FrameReported + = Touch_FrameReported; } Private Zero Touch_FrameReported (Object Sender, TouchFrameEventArgs e) {var point = e.GetPrimaryTouchPoint (this.CanvasLayer); If (TouchPanel.IsGestureAvailable) {GestureSample Hint = TouchPanel.ReadGesture (); If (gesture type hold == gesture. Gesture type) {IsActiveTouch = true; StartMoveWheel (point.Position); Hold Voil (Sender, E); } And this. Concealer ReissmusCapture (); IsActiveTouch = false; }} If (IfActiveTouch) testes {//}, then touch controls, then (point.TouchDevice.DirectlyOver == this.CanvasLayer) {switch (point.Action) {Case is TouchAction.Move CanavasLayer: if (! Point = null) MoveWheel (point.Position); break; Hair TouchAction.up: Default: ExecuteCompletedMoveWheel (); break; }} And {ExecuteCompletedMoveWheel (); }}}
Comments
Post a Comment