protected override void OnPointerPressed(PointerRoutedEventArgs e)
        {
            if (EnableSegmentDragging)
            {
                OnChartDragStart(e.GetCurrentPoint(SeriesPanel).Position, e.OriginalSource);
                SeriesPanel.CapturePointer(e.Pointer);
            }

            base.OnPointerPressed(e);
        }
Exemplo n.º 2
0
 protected override void OnPointerMoved(PointerRoutedEventArgs e)
 {
     if ((EnableSegmentDragging || EnableSeriesDragging) && PreviewSeries == null && DraggingSegment == null && e.Pointer.PointerDeviceType == PointerDeviceType.Touch)
     {
         SeriesPanel.CapturePointer(e.Pointer);
         var mousePos = e.GetCurrentPoint(SeriesPanel).Position;
         var element  = e.OriginalSource as FrameworkElement;
         if (element != null && element.Tag is ChartSegment)
         {
             if (Math.Abs(mousePos.X - mousePos.X) < 20 && Math.Abs(mousePos.Y - mousePos.Y) < 20)
             {
                 ActivateDragging(mousePos, e.OriginalSource);
             }
         }
     }
     else if (EnableSeriesDragging)
     {
         OnChartDragDelta(e.GetCurrentPoint(SeriesPanel).Position, e.OriginalSource);
     }
     else
     {
         base.OnPointerMoved(e);
     }
 }