Inheritance: Windows.UI.Xaml.RoutedEventArgs, IManipulationInertiaStartingRoutedEventArgs
 protected override void OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs e)
 {
     base.OnManipulationInertiaStarting(e);
     if (Action != null)
     {
         Action.OnManipulationInertiaStarting(e);
     }
 }
 private async void CatPlaceHolder_ManipulationInertiaStarting(object sender, ManipulationInertiaStartingRoutedEventArgs e)
 {
     if (e.Velocities.Linear.X > 0)
     {
         CatLove.Visibility = Windows.UI.Xaml.Visibility.Visible;
         Vote(10);
     }
     else if (e.Velocities.Linear.X < 0)
     {
         CatHater.Visibility = Windows.UI.Xaml.Visibility.Visible;
         Vote(1);
     }
     await NextCat();
 }
 void ManipulableScroll_ManipulationInertiaStarting(object sender, ManipulationInertiaStartingRoutedEventArgs e)
 {
     if (_isvertical)
         e.TranslationBehavior.DesiredDeceleration = 20.0 * 96.0 / (1000.0 * 1000.0);
     else _forcemanipulation2end = true;
 }
 private void ExecuteDisableInertiaCommand(ManipulationInertiaStartingRoutedEventArgs obj)
 {
     obj.TranslationBehavior.DesiredDeceleration = int.MaxValue;
 }
 // When a manipulation that's a result of inertia begins, change the color of the
 // the object to reflect that inertia has taken over
 void ManipulateMe_ManipulationInertiaStarting(object sender, ManipulationInertiaStartingRoutedEventArgs e)
 {
     manipulateMe.Background = new SolidColorBrush(Windows.UI.Colors.RoyalBlue);
 }
示例#6
0
 void Panel_ManipulationInertiaStarting_1(object sender, ManipulationInertiaStartingRoutedEventArgs e)
 {
     _isinertia = true;
     if (_manipulationenable)
     {
         if (_touches > 1)
         {
             e.TranslationBehavior.DesiredDeceleration = 300.0 * 96.0 / (1000.0 * 1000.0);
             e.ExpansionBehavior.DesiredDeceleration = 10.0 * 96.0 / (1000.0 * 1000.0);
             e.RotationBehavior.DesiredDeceleration = 300.0 * 96.0 / (1000.0 * 1000.0);
         }
     }
 }
示例#7
0
 /// <summary>
 /// ${ui_action_MapAction_event_OnManipulationInertiaStarting_D}
 /// </summary>
 public virtual void OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs e) { }
示例#8
0
 private void rect觸控測試區_ManipulationInertiaStarting(object sender, ManipulationInertiaStartingRoutedEventArgs e)
 {
     Debug.WriteLine("ManipulationInertiaStarting");
 }
示例#9
0
        /// <summary>
        /// Called before the ManipulationInertiaStarting event occurs.
        /// </summary>
        /// <param name="e">Event data for the event.</param>
        /// <remarks>
        /// This is used for touch scrolling.
        /// </remarks>
        protected override void OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs e)
        {
            this.scroller += e.Delta.Translation.Y;
            ProcessScroller();
            e.Handled = true;

            base.OnManipulationInertiaStarting(e);
        }
示例#10
0
 private void LargeAlbumCover_ManipulationInertiaStarting(object sender, ManipulationInertiaStartingRoutedEventArgs e)
 {
     e.TranslationBehavior.DesiredDeceleration = 0.001;
 }
示例#11
0
 void ManipulateMe_ManipulationInertiaStarting(object sender, ManipulationInertiaStartingRoutedEventArgs e)
 {
     e.Handled = true;
 }
 private void theCanvas_ManipulationInertiaStarting(object sender, ManipulationInertiaStartingRoutedEventArgs e)
 {
     //isInInertion = true;
       e.RotationBehavior.DesiredDeceleration = 0;
       e.RotationBehavior.DesiredRotation = int.MaxValue;
 }
示例#13
0
 private void RefreshLoadPanel_ManipulationInertiaStarting(object sender, Windows.UI.Xaml.Input.ManipulationInertiaStartingRoutedEventArgs e)
 {
     Debug.WriteLine("### Inertia Starting");
 }
示例#14
0
        private void OnBorderManipulationInertiaStarting(object sender, ManipulationInertiaStartingRoutedEventArgs e)
        {
            _flickStartX = this.X;
            _flickStartY = this.Y;
            _flickStartCumulativeX = e.Cumulative.Translation.X;
            _flickStartCumulativeY = e.Cumulative.Translation.Y;

            if (_isDraggingFromSnapped)
            {
                // TODO: Prevent snapping if flicking towards center of screen
            }

            if (_layoutGridTransform != null)
            {
                _flickStartAngle = _layoutGridTransform.Rotation;
            }

            var naturalFlickDisplacement = e.GetExpectedDisplacement();
            e.TranslationBehavior.DesiredDisplacement = naturalFlickDisplacement;
            _naturalFlickDisplacementX = e.GetExpectedDisplacementX();
            _naturalFlickDisplacementY = e.GetExpectedDisplacementY();

            Edges desiredSnapEdge;
            var desiredPosition = this.GetDesiredPosition(_flickStartX + _naturalFlickDisplacementX, _flickStartY + _naturalFlickDisplacementY, out _flickAdjustedEndAngle, out desiredSnapEdge);
            _flickAdjustedEndX = desiredPosition.X;
            _flickAdjustedEndY = desiredPosition.Y;

            if (desiredSnapEdge == Edges.None)
            {
                return;
            }

            _lastSnapEdge = desiredSnapEdge;
            _isAdjustedFlick = true;

            if (_flickAdjustedEndX != _naturalFlickDisplacementX && (_flickAdjustedEndY == _naturalFlickDisplacementY ||
                _flickAdjustedEndX.Distance(_naturalFlickDisplacementX) > _flickAdjustedEndY.Distance(_naturalFlickDisplacementY)))
            {
                // snap to left or right side
                e.SetDesiredDisplacementX(_flickAdjustedEndX - _flickStartX);
                _naturalFlickDisplacementX = e.GetExpectedDisplacementX();
                _naturalFlickDisplacementY = e.GetExpectedDisplacementY();
            }
            else if (_flickAdjustedEndY != _naturalFlickDisplacementY && (_flickAdjustedEndX == _naturalFlickDisplacementX ||
                _flickAdjustedEndX.Distance(_naturalFlickDisplacementY) > _flickAdjustedEndY.Distance(_naturalFlickDisplacementX)))
            {
                // snap to left or right side
                e.SetDesiredDisplacementY(_flickAdjustedEndY - _flickStartY);
                _naturalFlickDisplacementX = e.GetExpectedDisplacementX();
                _naturalFlickDisplacementY = e.GetExpectedDisplacementY();
            }

            if (e.GetExpectedDisplacementDuration() > 0.5)
            {
                _isFlickTooLong = true;
                _restorePositionOnStateChange = false;
                this.WindowState = WindowStates.Snapped;
                _restorePositionOnStateChange = true;

                if (WindowEdgeSnapBehavior != WindowEdgeSnapBehavior.ToTitleBarWithRotation)
                {
#pragma warning disable 4014
                    AnimateStraightSnapAsync(_flickAdjustedEndX, _flickAdjustedEndY);
#pragma warning restore 4014
                }
                else
                {
#pragma warning disable 4014
                    AnimateRotatedSnapAsync(_flickAdjustedEndX, _flickAdjustedEndY, _flickAdjustedEndAngle);
#pragma warning restore 4014
                }
            }
        }
        private void collageCanvas_ManipulationStarting(object sender, ManipulationInertiaStartingRoutedEventArgs e)
        {

        }
示例#16
0
        private void overlay_ManipulationInertiaStarting(object sender, ManipulationInertiaStartingRoutedEventArgs e)
        {

        }
示例#17
0
 private static void OnManipulationInertiaStarting(object sender, ManipulationInertiaStartingRoutedEventArgs e)
 {
     e.TranslationBehavior.DesiredDeceleration = 25 * 96.0 / (1000.0 * 1000.0);
 }
示例#18
0
 void LOReaderView_ManipulationInertiaStarting(object sender, ManipulationInertiaStartingRoutedEventArgs e)
 {
 }
 private void Box_ManipulationInertiaStarting(object sender, ManipulationInertiaStartingRoutedEventArgs e)
 {
     // ToDo: Define these magic numbers. Look at desiredDeceleration property.
     e.TranslationBehavior.DesiredDeceleration = 500.0 * 96.0 / (1000.0 * 1000.0);
     e.Handled = true;
 }
示例#20
0
 protected override void OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs e)
 {
     e.TranslationBehavior.DesiredDeceleration = FlickRotateDeceleration;
     e.Handled = true;
 }
示例#21
0
 private void Page_ManipulationInertiaStarting_1(object sender, Windows.UI.Xaml.Input.ManipulationInertiaStartingRoutedEventArgs e)
 {
     // TODO: Add event handler implementation here.
 }
示例#22
0
		private void ButtonSnap_OnManipulationInertiaStarting(object sender, ManipulationInertiaStartingRoutedEventArgs e)
		{
			Debug.WriteLine("ButtonSnap_OnManipulationInertiaStarting");
		}
 private void ManipulationStackPanel_ManipulationInertiaStarting(object sender, ManipulationInertiaStartingRoutedEventArgs e)
 {
     RootSplitView.IsPaneOpen = !RootSplitView.IsPaneOpen;
 }
 private void ScrollContentPresenter_OnManipulationInertiaStarting(object sender, ManipulationInertiaStartingRoutedEventArgs e)
 {
     var tr = _presenter.RenderTransform as TranslateTransform;
     // 閾値に達していない状態で慣性スクロールが始まった場合引っ張って更新の計算をスキップする
     _inertiaIgnoring = tr.Y < Threshold && !_isRefreshing;
 }
示例#25
0
		private void OnGridChartArea_ManipulationInertiaStarting(object sender, ManipulationInertiaStartingRoutedEventArgs e)
		{
			GridChartArea.Opacity = .2;
		}
        private void HandleEllipseInertionStarted(object sender, ManipulationInertiaStartingRoutedEventArgs e)
        {
            e.TranslationBehavior.DesiredDeceleration = int.MaxValue;

        }