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

The service handling the snapping of diagram items.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

C#
public interface ISnappingService

Derived Classes: SnappingService

Methods

Clears after the snap action.

C#
void ClearSnap()

Initializes the snap action.

C#
void InitializeSnap(IEnumerable<IShape> staticItems, IDiagramItem mainItem, bool isSnapToItemsEnabled, bool isSnapToGridEnabled, Point initialPosition)
Parameters:staticItemsIEnumerable<IShape>

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

mainItemIDiagramItem

The main item - the item that drag started from.

isSnapToItemsEnabledbool

The is snap to items enabled.

isSnapToGridEnabledbool

The is snap to grid enabled.

initialPositionPoint

The initial position.

Changes the snapping engine.

C#
void SetSnappingEngine(SnappingEngine snappingEngine)
Parameters:snappingEngineSnappingEngine

Snaps the new dragging position.

C#
Point SnapItems(IEnumerable<IDiagramItem> selectedItems, Point newPosition)
Parameters:selectedItemsIEnumerable<IDiagramItem>

The selected items.

newPositionPoint

The new position.

Returns:

Point

Snaps point.

C#
Point SnapPoint(Point point)
Parameters:pointPoint

The point to snap.

Returns:

Point

The snapped point.

Events

Occurs when snapping lines have been calculated.

C#
event EventHandler<SnappingLinesCalculatedEventArgs> SnappingLinesCalculated