Class
DraggingService

Represents the Dragging service responsible for dragging operations in Diagram.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Syntax:

cs-api-definition
public class DraggingService : GraphServiceBase, IDraggingService

Inheritance: objectGraphServiceBaseDraggingService

Implements: IDraggingService

Inherited Members GraphServiceBase.Graph

Constructors

DraggingService(IGraphInternal)

Initializes a new instance of the DraggingService class.

Declaration

cs-api-definition
public DraggingService(IGraphInternal graph)

Parameters

graph

IGraphInternal

The graph.

Properties

DragOverShape

Gets the currently drag over shape.

Declaration

cs-api-definition
public IDragDropAware DragOverShape { get; }

Property Value

IDragDropAware

The drag over shape.

Implements IDraggingService.DragOverShape

DraggingModels

Gets the currently dragging models if any.

Declaration

cs-api-definition
public IEnumerable<IDiagramItem> DraggingModels { get; }

Property Value

IEnumerable<IDiagramItem>

The dragging models.

Implements IDraggingService.DraggingModels

IsDragging

Determines whether there's a dragging operation in progress.

Declaration

cs-api-definition
public bool IsDragging { get; }

Property Value

bool

Implements IDraggingService.IsDragging

Methods

CanDrag(Point)

Determines whether you can drag to the new point.

Declaration

cs-api-definition
public virtual bool CanDrag(Point newPoint)

Parameters

newPoint

Point

The new point.

Returns

bool

Implements IDraggingService.CanDrag(Point)

CompleteDrag()

Completes the drag.

Declaration

cs-api-definition
public virtual void CompleteDrag()

Implements IDraggingService.CompleteDrag()

CreateAsyncDragCommand(IUndoRedoService, IEnumerable<IDiagramItem>)

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.

Declaration

cs-api-definition
public CompositeAsyncStateCommand CreateAsyncDragCommand(IUndoRedoService undoRedoService, IEnumerable<IDiagramItem> items)

Parameters

undoRedoService

IUndoRedoService

The undo-redo service.

items

IEnumerable<IDiagramItem>

The items which are affected.

Returns

CompositeAsyncStateCommand

The undoable async command.

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

Drag(Point)

Drags to the specified new point.

Declaration

cs-api-definition
public virtual void Drag(Point newPoint)

Parameters

newPoint

Point

The new point.

Implements IDraggingService.Drag(Point)

InitializeDrag(Point)

Initializes the drag.

Declaration

cs-api-definition
public virtual void InitializeDrag(Point point)

Parameters

point

Point

The drag start point.

Implements IDraggingService.InitializeDrag(Point)

StartDrag(IEnumerable<IDiagramItem>, Point)

Starts the drag.

Declaration

cs-api-definition
public virtual bool StartDrag(IEnumerable<IDiagramItem> models, Point currentPoint)

Parameters

models

IEnumerable<IDiagramItem>

The models.

currentPoint

Point

The current point.

Returns

bool

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

Events

CompleteDragging

Occurs on drag complete.

Declaration

cs-api-definition
public event EventHandler<PositionChangedEventArgs> CompleteDragging

Event Value

EventHandler<PositionChangedEventArgs>

Implements IDraggingService.CompleteDragging

DragEnter

Occurs on drag enter.

Declaration

cs-api-definition
public event EventHandler<DragItemsEventArgs> DragEnter

Event Value

EventHandler<DragItemsEventArgs>

Implements IDraggingService.DragEnter

DragLeave

Occurs on drag leave.

Declaration

cs-api-definition
public event EventHandler<DragItemsEventArgs> DragLeave

Event Value

EventHandler<DragItemsEventArgs>

Implements IDraggingService.DragLeave

Dragging

Occurs when dragging.

Declaration

cs-api-definition
public event EventHandler<PositionChangedEventArgs> Dragging

Event Value

EventHandler<PositionChangedEventArgs>

Implements IDraggingService.Dragging

Drop

Occurs on drop.

Declaration

cs-api-definition
public event EventHandler<DragItemsEventArgs> Drop

Event Value

EventHandler<DragItemsEventArgs>

Implements IDraggingService.Drop

StartDragging

Occurs on drag start.

Declaration

cs-api-definition
public event EventHandler<CancelingPositionChangedEventArgs> StartDragging

Event Value

EventHandler<CancelingPositionChangedEventArgs>

Implements IDraggingService.StartDragging