InterfaceISnappingService
The service handling the snapping of diagram items.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.Windows.Diagrams.Core.dll
Syntax:
public interface ISnappingService
Methods
InitializeSnap(IEnumerable<IShape>, IDiagramItem, bool, bool, Point)
Initializes the snap action.
Declaration
void InitializeSnap(IEnumerable<IShape> staticItems, IDiagramItem mainItem, bool isSnapToItemsEnabled, bool isSnapToGridEnabled, Point initialPosition)
Parameters
staticItems
The static items - the items that you don't drag at the moment.
mainItem
The main item - the item that drag started from.
isSnapToItemsEnabled
The is snap to items enabled.
isSnapToGridEnabled
The is snap to grid enabled.
initialPosition
Point
The initial position.
SetSnappingEngine(SnappingEngine)
Changes the snapping engine.
Declaration
void SetSnappingEngine(SnappingEngine snappingEngine)
Parameters
snappingEngine
SnapItems(IEnumerable<IDiagramItem>, Point)
Snaps the new dragging position.
Declaration
Point SnapItems(IEnumerable<IDiagramItem> selectedItems, Point newPosition)
Parameters
selectedItems
The selected items.
newPosition
Point
The new position.
Returns
Point
SnapPoint(Point)
Snaps point.
Declaration
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
event EventHandler<SnappingLinesCalculatedEventArgs> SnappingLinesCalculated
Event Value