New to Telerik UI for WinFormsStart a free 30-day trial

Represents the Dragging service responsible for dragging operations in Diagram.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

C#
public class DraggingService : GraphServiceBase, IDraggingService

Inheritance: objectGraphServiceBaseDraggingService

Implements: IDraggingService

Inherited Members GraphServiceBase.Graph

Constructors

Initializes a new instance of the DraggingService class.

C#
public DraggingService(IGraphInternal graph)
Parameters:graphIGraphInternal

The graph.

Properties

Gets the currently dragging models if any.

C#
public IEnumerable<IDiagramItem> DraggingModels { get; }
Property Value:

The dragging models.

Implements: IDraggingService.DraggingModels

Gets the currently drag over shape.

C#
public IDragDropAware DragOverShape { get; }
Property Value:

The drag over shape.

Implements: IDraggingService.DragOverShape

Determines whether there's a dragging operation in progress.

C#
public bool IsDragging { get; }

Implements: IDraggingService.IsDragging

Methods

Determines whether you can drag to the new point.

C#
public virtual bool CanDrag(Point newPoint)
Parameters:newPointPoint

The new point.

Returns:

bool

Implements: IDraggingService.CanDrag(Point)

Completes the drag.

C#
public virtual void CompleteDrag()

Implements: IDraggingService.CompleteDrag()

Creates the async drag command which has to be completed at a later time. This method is used both by the Nudge keyboard handler and by the dragging tool.

C#
public CompositeAsyncStateCommand CreateAsyncDragCommand(IUndoRedoService undoRedoService, IEnumerable<IDiagramItem> items)
Parameters:undoRedoServiceIUndoRedoService

The undo-redo service.

itemsIEnumerable<IDiagramItem>

The items which are affected.

Returns:

CompositeAsyncStateCommand

The undoable async command.

Implements: IDraggingService.CreateAsyncDragCommand(IUndoRedoService, IEnumerable<IDiagramItem>)

Drags to the specified new point.

C#
public virtual void Drag(Point newPoint)
Parameters:newPointPoint

The new point.

Implements: IDraggingService.Drag(Point)

Initializes the drag.

C#
public virtual void InitializeDrag(Point point)
Parameters:pointPoint

The drag start point.

Implements: IDraggingService.InitializeDrag(Point)

Starts the drag.

C#
public virtual bool StartDrag(IEnumerable<IDiagramItem> models, Point currentPoint)
Parameters:modelsIEnumerable<IDiagramItem>

The models.

currentPointPoint

The current point.

Returns:

bool

Implements: IDraggingService.StartDrag(IEnumerable<IDiagramItem>, Point)

Events

Occurs on drag complete.

C#
public event EventHandler<PositionChangedEventArgs> CompleteDragging

Implements: IDraggingService.CompleteDragging

Occurs on drag enter.

C#
public event EventHandler<DragItemsEventArgs> DragEnter

Implements: IDraggingService.DragEnter

Occurs when dragging.

C#
public event EventHandler<PositionChangedEventArgs> Dragging

Implements: IDraggingService.Dragging

Occurs on drag leave.

C#
public event EventHandler<DragItemsEventArgs> DragLeave

Implements: IDraggingService.DragLeave

Occurs on drop.

C#
public event EventHandler<DragItemsEventArgs> Drop

Implements: IDraggingService.Drop

Occurs on drag start.

C#
public event EventHandler<CancelingPositionChangedEventArgs> StartDragging

Implements: IDraggingService.StartDragging