コード例 #1
0
        void OnDragStarted(object sender, C1DragStartedEventArgs e)
        {
            var position = GetPosition();

            _initialX             = position.X;
            _initialY             = position.Y;
            Rectangle.BorderBrush = new SolidColorBrush(Colors.GreenYellow);
        }
コード例 #2
0
        void HandleDragStarted(object sender, C1DragStartedEventArgs e)
        {
            var ht = flexChart.HitTest(e.GetPosition(flexChart));

            if (ht.Distance < 3 && ht.X != null && ht.Y != null)
            {
                clickedItem = ht.Item as DataItem;
            }
        }
コード例 #3
0
 void OnDragStarted(object sender, C1DragStartedEventArgs e)
 {
     _position = e.GetPosition(image);
     _line     = new Line
     {
         X1                 = _position.X,
         Y1                 = _position.Y,
         X2                 = _position.X,
         Y2                 = _position.Y,
         Stroke             = new SolidColorBrush(Colors.Blue),
         StrokeThickness    = 7,
         StrokeEndLineCap   = PenLineCap.Triangle,
         StrokeStartLineCap = PenLineCap.Round
     };
     imageGrid.Children.Add(_line);
 }
コード例 #4
0
 private void OnDragStarted(object sender, C1DragStartedEventArgs e)
 {
     Point point = UIElementEx.C1TransformToVisual(_grid, null).Inverse.Transform(e.Origin);
     _htDragStarted = _grid.HitTest(point);
     if (e.PointerDeviceType == C1PointerDeviceType.Touch)
     {
         _startScrollPosition = _grid.ScrollPosition;
         _startOverSelectedCell = ((_htDragStarted.CellType == CellType.Cell || _htDragStarted.CellType == CellType.RowHeader)
                                   && _htDragStarted.CellRange.IsSingleCell && _grid.GetSelectedState(_htDragStarted.CellRange) != SelectedState.None);
     }
     if (_cellResize.Row == -1 && (e.PointerDeviceType == C1PointerDeviceType.Mouse || _startOverSelectedCell))
     {
         if (e.PointerDeviceType == C1PointerDeviceType.Touch)
         {
             HandleSelection(Kbd.IsShiftPressed(), true, _htDragStarted, _htDragStarted);
         }
         _tmScroll.Start();
     }
 }
コード例 #5
0
 void OnDragStarted(object sender, C1DragStartedEventArgs e)
 {
     _startPosition = e.Origin;
 }