Interface
ISnappingService

The service handling the snapping of diagram items.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Syntax:

cs-api-definition
public interface ISnappingService

Methods

ClearSnap()

Clears after the snap action.

Declaration

cs-api-definition
void ClearSnap()

InitializeSnap(IEnumerable<IShape>, IDiagramItem, bool, bool, Point)

Initializes the snap action.

Declaration

cs-api-definition
void InitializeSnap(IEnumerable<IShape> staticItems, IDiagramItem mainItem, bool isSnapToItemsEnabled, bool isSnapToGridEnabled, Point initialPosition)

Parameters

staticItems

IEnumerable<IShape>

The static items - the items that you don't drag at the moment.

mainItem

IDiagramItem

The main item - the item that drag started from.

isSnapToItemsEnabled

bool

The is snap to items enabled.

isSnapToGridEnabled

bool

The is snap to grid enabled.

initialPosition

Point

The initial position.

SetSnappingEngine(SnappingEngine)

Changes the snapping engine.

Declaration

cs-api-definition
void SetSnappingEngine(SnappingEngine snappingEngine)

Parameters

snappingEngine

SnappingEngine

SnapItems(IEnumerable<IDiagramItem>, Point)

Snaps the new dragging position.

Declaration

cs-api-definition
Point SnapItems(IEnumerable<IDiagramItem> selectedItems, Point newPosition)

Parameters

selectedItems

IEnumerable<IDiagramItem>

The selected items.

newPosition

Point

The new position.

Returns

Point

SnapPoint(Point)

Snaps point.

Declaration

cs-api-definition
Point SnapPoint(Point point)

Parameters

point

Point

The point to snap.

Returns

Point

The snapped point.

Events

SnappingLinesCalculated

Occurs when snapping lines have been calculated.

Declaration

cs-api-definition
event EventHandler<SnappingLinesCalculatedEventArgs> SnappingLinesCalculated

Event Value

EventHandler<SnappingLinesCalculatedEventArgs>