InterfaceISnappingService
The service handling the snapping of diagram items.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.WinControls.RadDiagram.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
IEnumerable<IShape>
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
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
IEnumerable<IDiagramItem>
The selected items.
newPosition
The new position.
Returns
SnapPoint(Point)
Snaps point.
Events
SnappingLinesCalculated
Occurs when snapping lines have been calculated.
Declaration
event EventHandler<SnappingLinesCalculatedEventArgs> SnappingLinesCalculated
Event Value