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

C# Input.PointerRoutedEventArgs类代码示例

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

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



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

示例1: OnPointerWheelChanged

        private void OnPointerWheelChanged(object sender, PointerRoutedEventArgs e)
        {
            if (_isBusy)
            {
                return;
            }

            if (_panel.ItemsFitContent)
            {
                return;
            }

            var point = e.GetCurrentPoint(this);
            int sign = Math.Sign(point.Properties.MouseWheelDelta);
            if (sign > 0)
            {
                _headerContainer.TranslateDeltaX(1);
                _panelContainer.TranslateDeltaX(1);
                AnimatePrev();
            }
            else
            {
                _headerContainer.TranslateDeltaX(-1);
                _panelContainer.TranslateDeltaX(-1);
                AnimateNext();
            }
            e.Handled = true;
        }
开发者ID:ridomin,项目名称:waslibs,代码行数:28,代码来源:Pivorama.Manipulation.cs


示例2: MyCanvas_PointerMoved

        private void MyCanvas_PointerMoved(object sender, PointerRoutedEventArgs e)
        {
            PointerPoint point = e.GetCurrentPoint(this);
            // move paddle... x
            game.paddle.Move(point.Position.X);

        }
开发者ID:Taikakaulin,项目名称:Olio,代码行数:7,代码来源:MainPage.xaml.cs


示例3: CommentItem_PointerReleased

 private void CommentItem_PointerReleased(object sender, PointerRoutedEventArgs e)
 {
     if (AppSettings.Instance.UserInfo != null)
     {
         reviewRect.Visibility = reviewRect.Visibility == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible;
     }
 }
开发者ID:h82258652,项目名称:SoftwareKobo.U148For10,代码行数:7,代码来源:CommentItem.xaml.cs


示例4: xamDataChart_PointerMoved

        void xamDataChart_PointerMoved(object sender, PointerRoutedEventArgs e,
            Infragistics.Controls.Charts.XamDataChart targetChart)
        {
            XamDataChart chart = sender as XamDataChart;
            if (chart == null)
            {
                return;
            }
            //System.Diagnostics.Debug.WriteLine(targetChart.GetHashCode().ToString() + " PointerMoved: " + e.GetCurrentPoint(null).Position.ToString());

            chart = targetChart;
            foreach (var series in chart.Series)
            {
                var seriesPos = e.GetCurrentPoint(series).Position;
                //System.Diagnostics.Debug.WriteLine("TrySelectClosest: " + seriesPos.ToString());
                if (seriesPos.X >= 0 &&
                    seriesPos.X < series.ActualWidth &&
                    (sender != targetChart || (seriesPos.Y >= 0 && seriesPos.Y < series.ActualHeight)))
                {
                    SelectClosest(
                    series, seriesPos);
                }
            }

            if (sender == targetChart)
                CategoryChart_PointerMoved(sender, e, targetChart);

            if (sender == targetChart)
            {
                this.NotifyOtherTracker(sender, e);
            }
        }
开发者ID:K-Library-NET,项目名称:PopcornStudios,代码行数:32,代码来源:FlightAnalysis.xaml.cs


示例5: StackPanel_PointerPressed_1

        private void StackPanel_PointerPressed_1(object sender, PointerRoutedEventArgs e)
        {
            tipo = 1;

            this.Frame.Navigate(typeof(ItemsPage), "AllGroups");

        }
开发者ID:ecastillo550,项目名称:final,代码行数:7,代码来源:Home.xaml.cs


示例6: dPadPressed

        private void dPadPressed(object sender, PointerRoutedEventArgs e)
        {
            Image dPad = (Image)sender;
            PointerPoint point = e.GetCurrentPoint(dPad);

            Mediator.DPadPressed(point, dPad.Name);
        }
开发者ID:GudoshnikovaAnna,项目名称:qreal,代码行数:7,代码来源:GamepadPage.xaml.cs


示例7: uiElement_PointerMoved

        protected virtual void uiElement_PointerMoved(object sender, PointerRoutedEventArgs e)
        {
            if (moveD3dCanvas)
            {
                var newPosition = e.GetCurrentPoint(null);
                double deltaX = newPosition.Position.X - lastPos.Position.X;
                double deltaY = newPosition.Position.Y - lastPos.Position.Y;

                // Only support CompositeTransform and TranslateTransform
                // Is there any better way to handle this?
                if (uiElement.RenderTransform is CompositeTransform)
                {
                    var compositeTransform = (CompositeTransform)uiElement.RenderTransform;
                    compositeTransform.TranslateX += deltaX;
                    compositeTransform.TranslateY += deltaY;
                }
                else if (uiElement.RenderTransform is TranslateTransform)
                {
                    var translateTransform = (TranslateTransform)uiElement.RenderTransform;
                    translateTransform.X += deltaX;
                    translateTransform.Y += deltaY;
                }

                lastPos = newPosition;
            }
        }
开发者ID:MaybeMars,项目名称:SharpDX-Samples,代码行数:26,代码来源:DragHandler.cs


示例8: OnPointerPressed

        public void OnPointerPressed(InqCanvas inqCanvas, PointerRoutedEventArgs e)
        {
            Debug.WriteLine(e.Pointer.PointerDeviceType);
            _currentStroke = new PointCollection();
            _polyline = new Polyline
            {
                Stroke = new SolidColorBrush(StrokeColor),
                StrokeThickness = 3,
                StrokeLineJoin = PenLineJoin.Round
            };
            inqCanvas.Children.Add(_polyline);

            _polyline.Points = _currentStroke;

            var point = e.GetCurrentPoint(inqCanvas);

            _strokeBuilder.BeginStroke(point);
            _currentStroke.Add(point.Position);

            //_inkManager.

            /*
            //TODO: add data binding for thickness and color
            _currentStroke.StrokeThickness = Math.Max(4.0 * e.GetCurrentPoint(inqCanvas).Properties.Pressure, 2);
            _currentInqLineView.StrokeThickness = _currentStroke.StrokeThickness;
            inqCanvas.Children.Add(_currentInqLineView);
            var currentPoint = e.GetCurrentPoint(inqCanvas);
            _currentStroke.AddPoint(new Point(currentPoint.Position.X, currentPoint.Position.Y));
            */
        }
开发者ID:philllies,项目名称:finalproject,代码行数:30,代码来源:DrawInqMode.cs


示例9: OnPointerPressed

 public static void OnPointerPressed(RadialSlider slider, PointerRoutedEventArgs e)
 {
     slider.CapturePointer(e.Pointer);
     _lastPoint = e.GetCurrentPoint(slider);
     _isDragActive = true;
     e.Handled = true;
 }
开发者ID:Mordrag,项目名称:X-Air-Universal,代码行数:7,代码来源:RadialSliderDragValueHandler.cs


示例10: Canvas_PointerReleased

        private void Canvas_PointerReleased(object sender, PointerRoutedEventArgs e)
        {
            if (figureStartPoint != null)
            {
                var index = (int)((Figures.Margin.Left - 10) / 70);
                Figure figure = new Figure();
                figure.X1 = figureStartPoint.Position.X;
                figure.Y1 = figureStartPoint.Position.Y;
                figure.X2 = e.GetCurrentPoint(Canvas).Position.X;
                figure.Y2 = e.GetCurrentPoint(Canvas).Position.Y;

                figure.Fig = (FigureType)index;

                switch ((int)rotateColors.Angle)
                {
                    case 0:
                        figure.Color = Windows.UI.Color.FromArgb(255, 255, 0, 0);
                        break;
                    case 90:
                        figure.Color = Windows.UI.Color.FromArgb(255, 0, 255, 0);
                        break;
                    case 180:
                        figure.Color = Windows.UI.Color.FromArgb(255, 0, 0, 255);
                        break;
                    case 270:
                        figure.Color = Windows.UI.Color.FromArgb(255, 0, 0, 0);
                        break;
                    default:
                        break;
                }

                AddFigureToCanvas(figure);
                figureStartPoint = null;
            }
        }
开发者ID:psotirov,项目名称:TelerikAcademyProjects,代码行数:35,代码来源:MainPage.xaml.cs


示例11: OnPointerEntered

 private void OnPointerEntered(object sender, PointerRoutedEventArgs args)
 {
     if (args.Pointer.IsInContact)
         SetPressedContent();
     else
         SetOverContent();
 }
开发者ID:yukiyuki,项目名称:MyToolkit,代码行数:7,代码来源:ImageButton.cs


示例12: PlayArea_PointerPressed

        private void PlayArea_PointerPressed(object sender, PointerRoutedEventArgs e)
        {
            if (!_gameBoard.Interactable)
                return;

            if (_clickedPoint.Equals(EmptyPoint))
            {
             				_clickedPoint = e.GetCurrentPoint(PlayArea).Position;
                int row = (int)e.GetCurrentPoint(PlayArea).Position.Y / 60;
                int col = (int)e.GetCurrentPoint(PlayArea).Position.X / 60;

                _selectionSquare.Visibility = Visibility.Visible;
                _selectionSquare.SetValue(Canvas.LeftProperty, col * 60);
                _selectionSquare.SetValue(Canvas.TopProperty, row * 60);
            }
            else
            {
                int clickedRow = (int) _clickedPoint.Y/60;
                int clickedCol = (int) _clickedPoint.X/60;

                int row = (int) e.GetCurrentPoint(PlayArea).Position.Y/60;
                int col = (int) e.GetCurrentPoint(PlayArea).Position.X/60;
                _gameBoard.Swap(row, col, clickedRow, clickedCol);
                _clickedPoint = EmptyPoint;
                _selectionSquare.Visibility = Visibility.Collapsed;
            }
        }
开发者ID:roydor,项目名称:BeCheweled,代码行数:27,代码来源:MainPage.xaml.cs


示例13: gridNLS_PointerExited

 private void gridNLS_PointerExited(object sender, PointerRoutedEventArgs e)
 {
     borderNLS.Opacity = 0;
     rectNLS.Opacity = 0.5;
     rectNLS.Fill = new SolidColorBrush(Colors.Black);
     tbkNLS.Foreground = new SolidColorBrush(Colors.White);
 }
开发者ID:NanoBreeze,项目名称:Memory-Ultrapack,代码行数:7,代码来源:Practice.xaml.cs


示例14: LayoutRoot_PointerPressed

        public void LayoutRoot_PointerPressed(object sender, PointerRoutedEventArgs args)
        {
            //verify the settings have been entered and if so, launch the conventional navigation
            var canRun = true;
            object apiKey = null;

            if (!Windows.Storage.ApplicationData.Current.RoamingSettings.Values.TryGetValue("FlickrApiKey", out apiKey) || string.IsNullOrWhiteSpace((string)apiKey))
            {
                canRun = false;
            }

            object username = null;

            if (!Windows.Storage.ApplicationData.Current.RoamingSettings.Values.TryGetValue("FlickrUsername", out username) || string.IsNullOrWhiteSpace((string)username))
            {
                canRun = false;
            }

            if (canRun)
            {
                _RunApp((string)username, (string)apiKey);
            }
            else
            {
                var dialog = new MessageDialog("MetroFlickr requires an API key and a username in order to run. Please enter these in the settings charm under Preferences");
                dialog.ShowAsync();
            }
        }
开发者ID:sourcebits-thrivikramkashyap,项目名称:MetroFlickr,代码行数:28,代码来源:MainPage.xaml.cs


示例15: grdMatrix_pointer_pressed

 // On clicking of one of the Matrix LEDs find which row/column and enable/disable
 private void grdMatrix_pointer_pressed(object sender, PointerRoutedEventArgs e)
 {
     Rectangle _rect = sender as Rectangle;
     int _row = (int)_rect.GetValue(Grid.RowProperty);
     int _col = (int)_rect.GetValue(Grid.ColumnProperty);
     togglePixelandRedraw(_row, _col);
 }
开发者ID:justinstigall,项目名称:MAX7219-WinIoTCore,代码行数:8,代码来源:MainPage.xaml.cs


示例16: Grid_PointerPressed

 private void Grid_PointerPressed(object sender, PointerRoutedEventArgs e)
 {
     Point k = new Point();
     if(isfirst)
     {
         k.X = e.GetCurrentPoint((UIElement)sender).Position.X;
         k.Y = e.GetCurrentPoint((UIElement)sender).Position.Y;
         figure.StartPoint = new Point(k.X, k.Y); //poitner pressed
         isfirst = false;
     }
     else
     {
         k.X = pc.X;
         k.Y = pc.Y;
     }
     Line l = new Line {
         X1 = k.X,
         Y1 = k.Y,
         X2 = e.GetCurrentPoint((UIElement)sender).Position.X,
         Y2 = e.GetCurrentPoint((UIElement)sender).Position.Y,
         Stroke = new SolidColorBrush(Colors.Black)
     };
     ((Grid)sender).Children.Add(l);
     current = l;
 }
开发者ID:MohammedAbuissa,项目名称:KarakibLab,代码行数:25,代码来源:Drawing.xaml.cs


示例17: ValueTextBoxPointerExited

        private void ValueTextBoxPointerExited(object sender, PointerRoutedEventArgs e)
        {
#if WINDOWS_APP
            if (Window.Current.CoreWindow.PointerCursor.Type == CoreCursorType.IBeam)
                Window.Current.CoreWindow.PointerCursor = new CoreCursor(CoreCursorType.Arrow, 0);
#endif
        }
开发者ID:TorreyGarland,项目名称:Highway1.Universal,代码行数:7,代码来源:NumericUpDown.ValueControls.cs


示例18: UIElement_OnPointerEntered

        private void UIElement_OnPointerEntered(object sender, PointerRoutedEventArgs e)
        {
            var border = (Border)sender;

            // Somehow ZIndex doesn't work in the UniformGrid
            // Perhaps if Jupiter had a method called Panel.GetVisualChild available to override...
            // See: http://blog.pixelingene.com/2007/12/controlling-z-index-of-children-in-custom-controls/
            //Canvas.SetZIndex(border, ++_maxZIndex);
            var sb = new Storyboard();

            var a1 = new DoubleAnimation();
            a1.Duration = TimeSpan.FromSeconds(0.2);
            a1.To = 0.9;
            a1.EasingFunction = new PowerEase { Power = 2, EasingMode = EasingMode.EaseOut };
            Storyboard.SetTarget(a1, border.RenderTransform);
            Storyboard.SetTargetProperty(a1, "ScaleX");
            sb.Children.Add(a1);

            var a2 = new DoubleAnimation();
            a2.Duration = TimeSpan.FromSeconds(0.2);
            a2.To = 0.9;
            a2.EasingFunction = new PowerEase { Power = 2, EasingMode = EasingMode.EaseOut };
            Storyboard.SetTarget(a2, border.RenderTransform);
            Storyboard.SetTargetProperty(a2, "ScaleY");
            sb.Children.Add(a2);

            sb.Begin();
        }
开发者ID:siatwangmin,项目名称:WinRTXamlToolkit,代码行数:28,代码来源:UniformGridTestView.xaml.cs


示例19: OnPointerPressed

 protected override void OnPointerPressed(PointerRoutedEventArgs e)
 {
     var position = e.GetCurrentPoint(SettingsPanel).Position.X < 0;
       if (SettingsPanel.Margin.Right == 0 && position)
     SettingsPanel.Margin = new Thickness(0, 0, -346, 0);
       base.OnPointerPressed(e);
 }
开发者ID:ktjones,项目名称:BVCS2012,代码行数:7,代码来源:MainPage.xaml.cs


示例20: ListPhoto_Click

        private async void ListPhoto_Click(object sender, PointerRoutedEventArgs e)
        {
            Image image = sender as Image;
            ImageRecord imageRecord = image.DataContext as ImageRecord;

            LoadFile(await StorageApplicationPermissions.FutureAccessList.GetFileAsync(imageRecord.AccessToken));
        }
开发者ID:JoshuaKGoldberg,项目名称:Photo-Data-Viewer,代码行数:7,代码来源:MainPage.xaml.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Input.RightTappedRoutedEventArgs类代码示例发布时间:2022-05-26
下一篇:
C# Input.ManipulationStartedRoutedEventArgs类代码示例发布时间: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