• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Input.ManipulationCompletedEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Input.ManipulationCompletedEventArgs的典型用法代码示例。如果您正苦于以下问题:C# ManipulationCompletedEventArgs类的具体用法?C# ManipulationCompletedEventArgs怎么用?C# ManipulationCompletedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ManipulationCompletedEventArgs类属于System.Windows.Input命名空间,在下文中一共展示了ManipulationCompletedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CenterGrid_ManipulateCompleted

        private void CenterGrid_ManipulateCompleted(object sender, ManipulationCompletedEventArgs manipulationCompletedEventArgs)
        {
            double deltaX = TouchDownX - manipulationCompletedEventArgs.ManipulationOrigin.X;
            double deltaY = TouchDownY - manipulationCompletedEventArgs.ManipulationOrigin.Y;

            double absX = Math.Abs(TouchDownX - manipulationCompletedEventArgs.ManipulationOrigin.X);
            double absY = Math.Abs(TouchDownY - manipulationCompletedEventArgs.ManipulationOrigin.Y);

            if (absX > absY) //left or right
            {
                if (deltaX > 0 & deltaX > 12) //right
                {
                    ((StudyFlashCardSetViewModel)ViewModel).FlipCardRightCommand.Execute(null);
                }
                else if (deltaX < -12) //left
                {
                    ((StudyFlashCardSetViewModel)ViewModel).FlipCardLeftCommand.Execute(null);
                }
            }
            else // up or down
            {
                if (deltaY > 0 & deltaY > 12) //up
                {
                    ((StudyFlashCardSetViewModel)ViewModel).CorrectNextCardCommand.Execute(null);
                }
                else if (deltaY < -12) //down
                {
                    ((StudyFlashCardSetViewModel)ViewModel).IncorrectNextCardCommand.Execute(null);
                }
            }
        }
开发者ID:j-hayes,项目名称:Flash-Card-App,代码行数:31,代码来源:StudyFlashCardSetView.xaml.cs


示例2: CalendarButton_ManipulationCompleted

        private void CalendarButton_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
        {
            SolidColorBrush brush = new SolidColorBrush();
            brush.Color = (Color)App.Current.Resources["CalendarBackNormalGray"];

            CalendarButton.Background = brush;
        }
开发者ID:richardaum,项目名称:Metroist-for-Windows-Phone,代码行数:7,代码来源:AddTask.xaml.cs


示例3: azul_ManipulationCompleted_1

 private void azul_ManipulationCompleted_1(object sender, ManipulationCompletedEventArgs e)
 {
     Ellipse elipse = sender as Ellipse;
     string nombreObjeto = (sender as Ellipse).Name;
     bool entroAnterior=false;
     if (elipse.Name == "negro" || elipse.Name == "blanco" || elipse.Name == "amarillo" || elipse.Name=="verde")
     {
         if ((e.TotalManipulation.Translation.Y * -1) > 127 && (e.TotalManipulation.Translation.Y * -1) < 380)
         {
            entroAnterior= CambiarColores(nombreObjeto);
         }
    }
     else
     {
         if ((e.TotalManipulation.Translation.Y * -1) > 312 && (e.TotalManipulation.Translation.Y * -1) < 560)
         {
           entroAnterior= CambiarColores(nombreObjeto);
         }
     }
     if (!entroAnterior)
     {
         nombreAnterior = (sender as Ellipse).Name;
     }
     elipse.RenderTransform = null;
    
 }
开发者ID:jacevedo,项目名称:Windows-Phone,代码行数:26,代码来源:MainPage.xaml.cs


示例4: OnManipulationCompleted

        protected override void OnManipulationCompleted(ManipulationCompletedEventArgs e)
        {
            base.OnManipulationCompleted(e);

            if(BlockTransitions) return;

            var horizontalVelocity = e.FinalVelocities.LinearVelocity.X;
            var verticalVelocity = e.FinalVelocities.LinearVelocity.Y;

            var direction = GetDirection(horizontalVelocity, verticalVelocity);

            if (direction == Orientation.Horizontal && Math.Abs(horizontalVelocity) > 200)
            {
                if (e.TotalManipulation.Translation.X < 0)
                {
                    if (ShowNextButton)
                        SlideLeft.Begin();
                    else
                        SlideTopLeft.Begin();
                }
                else
                {
                    if (ShowPreviousButton)
                        SlideRight.Begin();
                    else
                        SlideTopRight.Begin();
                }
            }
        }
开发者ID:Belenar,项目名称:OtherAppRepository,代码行数:29,代码来源:FlipControl.xaml.cs


示例5: CalendarManipulationCompleted

        void CalendarManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
        {
            while (TouchPanel.IsGestureAvailable)
            {
                var gesture = TouchPanel.ReadGesture();
                if (gesture.GestureType == GestureType.Flick)
                {
                    double horizontal = gesture.Delta.X / Factor;
                    double vertical = gesture.Delta.Y / Factor;
                    if (Math.Abs(horizontal) > Math.Abs(vertical))
                    {
                        if ((int)horizontal > 0)
                        {
                            DecrementMonth();
                        }
                        else
                        {
                            IncrementMonth();
                        }
                    }
                    else
                    {
                        if ((int)vertical > 0)
                        {
                            DecrementYear();
                        }
                        else
                        {
                            IncrementYear();

                        }
                    }
                }
            }
        }
开发者ID:AndrzejRPiotrowski,项目名称:Startups,代码行数:35,代码来源:Calendar.cs


示例6: btn_Camera_ManipulationCompleted

 private void btn_Camera_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
 {
     PhotoChooserTask pcTask = new PhotoChooserTask();
     pcTask.ShowCamera = true;
     pcTask.Completed += new EventHandler<PhotoResult>(pcTask_Completed);
     pcTask.Show();
 }
开发者ID:GhostSoar,项目名称:JigsawPuzzle,代码行数:7,代码来源:CameraOrPhotosLibrary.xaml.cs


示例7: OnManipulationCompleted

 protected override void OnManipulationCompleted(ManipulationCompletedEventArgs e)
 {
     string dest = "/page2.xaml";
     canvy.Children.Remove(jolidessin);
     this.NavigationService.Navigate(new Uri(dest, UriKind.Relative));
     base.OnManipulationCompleted(e);
 }
开发者ID:gabrielhan,项目名称:Wphone,代码行数:7,代码来源:Page1.xaml.cs


示例8: azul_ManipulationCompleted_1

        // Al soltar el circulo. Comprueba coordenadas.
        private void azul_ManipulationCompleted_1(object sender, ManipulationCompletedEventArgs e)
        {
            Ellipse elipse = sender as Ellipse;
            string nombreObjeto = (sender as Ellipse).Name;
            double elipsex = Canvas.GetLeft(rect) + e.TotalManipulation.Translation.X;
            double elipsey = Canvas.GetTop(rect) + e.TotalManipulation.Translation.Y;
            //Canvas.Left="130" Canvas.Top="138"  Width="187"
            if (elipse.Name == "rojo" || elipse.Name == "azul" || elipse.Name == "amarillo")
            {
                if ((elipsex * -1) > 130 && (elipsex * -1) < 317)
                {
                    CambiarColores(nombreObjeto, nombreAnterior);
                }
            }
                //??
            else
            {
                if ((e.TotalManipulation.Translation.Y * -1) > 312 && (e.TotalManipulation.Translation.Y * -1) < 560)
                {
                    CambiarColores(nombreObjeto, nombreAnterior);
                }
            }

            if (ver == 0)
            {
                nombreAnterior = (sender as Ellipse).Name;
            }
            elipse.RenderTransform = null;
            dragTranslation = new CompositeTransform();
        }
开发者ID:jacevedo,项目名称:Windows-Phone,代码行数:31,代码来源:MainPage.xaml.cs


示例9: OnManipulationCompleted

        protected override void OnManipulationCompleted(ManipulationCompletedEventArgs e)
        {
            if (e.TotalManipulation.Translation.X == 0.0 && e.TotalManipulation.Translation.Y == 0.0)
                HandleMouseEvent(e.ManipulationOrigin);

            base.OnManipulationCompleted(e);
        }
开发者ID:michaellperry,项目名称:MyCon,代码行数:7,代码来源:RatingControl.xaml.cs


示例10: Slider1ManipulationCompleted

 private void Slider1ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
 {
     var totalminutes = (int)slider1.Value;
     _hours = totalminutes / 60;
     _minutes = totalminutes - (60 * _hours);
     inpDuration.Value = new TimeSpan(_hours, _minutes, 0);
 }
开发者ID:mmadsen42,项目名称:ThumbReg-for-TimeLog-Project,代码行数:7,代码来源:AddRegistrationPage.xaml.cs


示例11: Element_ManipulationCompleted

        private void Element_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
        {
            if (!IsActive)
            return;

              FrameworkElement fe = sender as FrameworkElement;
              if (Math.Abs(e.TotalManipulation.Translation.X) > fe.ActualWidth / 2 ||
            Math.Abs(e.FinalVelocities.LinearVelocity.X) > FlickVelocity)
              {
            if (e.TotalManipulation.Translation.X < 0.0)
            {
              ToDoItemDeletedAction(fe);
            }
            else
            {
              ToDoItemCompletedAction(fe);
            }
              }
              else
              {
            ToDoItemBounceBack(fe);
              }

              IsActive = false;
        }
开发者ID:andersberglund,项目名称:WP7-ClearStyle,代码行数:25,代码来源:SwipeInteraction.cs


示例12: OnManipulationCompleted

        protected override void OnManipulationCompleted(ManipulationCompletedEventArgs e)
        {
            FrameworkElement _root = Application.Current.RootVisual
               as FrameworkElement;
            myDate = (DateTime)_root.DataContext;

            // swipe to the right (100 pixels to the right
            // and -25 to 25 up or down in the translation)
            // change to nextday
            if (e.TotalManipulation.Translation.X > 100 &&
                (e.TotalManipulation.Translation.Y > -25 &&
                 e.TotalManipulation.Translation.Y < 25))
            {
                _root.DataContext = myDate.AddDays(-1);

                NavigationService.Navigate(new Uri("/Page/DayEvent.xaml?Refresh=" + DateTime.Now, UriKind.Relative));
            }

            // swipe to the left (100 pixels to the left
            // and -25 to 25 up or down in the translation)
            // change to previous day
            if (e.TotalManipulation.Translation.X < -100 &&
                (e.TotalManipulation.Translation.Y > -25 &&
                 e.TotalManipulation.Translation.Y < 25))
            {
                _root.DataContext = myDate.AddDays(1);

                NavigationService.Navigate(new Uri("/Page/DayEvent.xaml?Refresh=" + DateTime.Now, UriKind.Relative));
            }
        }
开发者ID:pokpatrick,项目名称:PhoneApp,代码行数:30,代码来源:DayEvent.xaml.cs


示例13: FrontImage_ManipulationCompleted

        void FrontImage_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
        {
            App app = (App)Application.Current;

            if (canBeChanged && app.canPlay)
            {
                Stream stream = TitleContainer.OpenStream("sounds/flip/" + RandomNumber(1, 10) + ".wav");
                SoundEffect effect = SoundEffect.FromStream(stream);
                FrameworkDispatcher.Update();
                effect.Play();
                app.manager.setNextCard(this);
            }
            
            /*
            if (e.OriginalSource == this.FrontImage)
            {
                Console.Write("foo");
                this.FrontImage.Visibility = Visibility.Collapsed;
                this.BackImage.Visibility = Visibility.Visible;
            }
            else if (e.OriginalSource == this.BackImage)
            {
                Console.Write("foo");
                this.BackImage.Visibility = Visibility.Collapsed;
                this.FrontImage.Visibility = Visibility.Visible;
            }*/
            
        }
开发者ID:tobiasheine,项目名称:EyeemMemory,代码行数:28,代码来源:EyeemMemoryCard.xaml.cs


示例14: Border_ManipulationCompleted

 private void Border_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
 {
     // suppress zoom
     if (e.FinalVelocities.ExpansionVelocity.X != 0.0 ||
         e.FinalVelocities.ExpansionVelocity.Y != 0.0)
         e.Handled = true;
 }
开发者ID:timextreasures,项目名称:WordPress-WindowsPhone,代码行数:7,代码来源:LicensesPage.xaml.cs


示例15: canvas_ManipulationCompleted

        private void canvas_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
        {
            var left = Canvas.GetLeft(LayoutRoot);
            if (_viewMoved)
                return;
            if (Math.Abs(initialPosition - left) < 100)
            {
                //bouncing back
                MoveViewWindow(initialPosition);
                return;
            }
            //change of state
            if (initialPosition - left > 0)
            {
                //slide to the left
                if (initialPosition > -420)
                    MoveViewWindow(-420);
                else
                    MoveViewWindow(-840);
            }
            else
            {
                //slide to the right
                if (initialPosition < -420)
                    MoveViewWindow(-420);
                else
                    MoveViewWindow(0);
            }

        }
开发者ID:angelroic,项目名称:Upreal,代码行数:30,代码来源:MyList.xaml.cs


示例16: Border_ManipulationCompleted

 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Border_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
 {
     // Disable snap zoom
     if (e.FinalVelocities != null && (e.FinalVelocities.ExpansionVelocity.X != 0.0 || e.FinalVelocities.ExpansionVelocity.Y != 0.0))
     {
         e.Handled = true;
     }
 }
开发者ID:FIBUPC,项目名称:Raco-HTML5,代码行数:13,代码来源:DisableBrowserZoom.cs


示例17: NextImage_ManipulationCompleted

 private void NextImage_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
 {
     if (m_viewmodel.IsForwardEnabled)
     {
         m_viewmodel.LoadViewModel(m_viewmodel.MonthID + 1);
         RenderUI();
     }
 }
开发者ID:manojattal,项目名称:WindowsPhone7Apps,代码行数:8,代码来源:MonthControl.xaml.cs


示例18: obj_Zoom_ManipulationCompleted

 void obj_Zoom_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
 {
     PanAndZoomImage panAndZoomImage = (PanAndZoomImage)sender;
     if (Math.Abs(panAndZoomImage.Zoom - 1.0) < 0.05)
     {
         panAndZoomImage.Zoom = 1.0;
     }
 }
开发者ID:Tuanna123,项目名称:MangaOL,代码行数:8,代码来源:UcImage.xaml.cs


示例19: BackImage_ManipulationCompleted

 private void BackImage_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
 {
     if (m_viewmodel.IsBackEnabled)
     {
         m_viewmodel.LoadViewModel(m_viewmodel.MonthID - 1);
         RenderUI();
     }
 }
开发者ID:manojattal,项目名称:WindowsPhone7Apps,代码行数:8,代码来源:MonthControl.xaml.cs


示例20: IsTapped

        /// <summary>
        /// Is Tapped.
        /// </summary>
        /// <param name="e"></param>
        /// <returns></returns>
        public static bool IsTapped(ManipulationCompletedEventArgs e)
        {
            if (e.IsInertial)
                return false;

            Point t = e.TotalManipulation.Translation;
            return System.Math.Abs(t.X) <= TAP_THRESHOLD
                && System.Math.Abs(t.Y) <= TAP_THRESHOLD;
        }
开发者ID:popopome,项目名称:memocloud,代码行数:14,代码来源:UiUtils.cs



注:本文中的System.Windows.Input.ManipulationCompletedEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Input.ManipulationDeltaEventArgs类代码示例发布时间:2022-05-26
下一篇:
C# Input.KeyboardFocusChangedEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap