Class SnappingService
This class is accountable for calculating snapping related transformations for position and size.
Inherited Members
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.WinControls.RadDiagram.dll
Syntax
public class SnappingService : GraphServiceBase, ISnappingService
Constructors
SnappingService(IGraphInternal)
Initializes a new instance of the SnappingService class.
Declaration
public SnappingService(IGraphInternal graph)
Parameters
IGraphInternal
graph
The graph. |
Methods
ClearSnap()
Clears after the snap action.
Declaration
public virtual void ClearSnap()
Implements
InitializeSnap(IEnumerable<IShape>, IDiagramItem, Boolean, Boolean, Point)
Initializes the snap action.
Declaration
public virtual void InitializeSnap(IEnumerable<IShape> staticItems, IDiagramItem mainItem, bool isSnapToItemsEnabled, bool isSnapToGridEnabled, Point initialPosition)
Parameters
System.Collections.Generic.IEnumerable<IShape>
staticItems
The static items - the items that you don't drag at the moment. |
IDiagramItem
mainItem
The main item - the item that drag started from. |
System.Boolean
isSnapToItemsEnabled
The is snap to items enabled. |
System.Boolean
isSnapToGridEnabled
The is snap to grid enabled. |
Point
initialPosition
The initial position. |
Implements
SetSnappingEngine(SnappingEngine)
Changes the snapping engine.
Declaration
public virtual void SetSnappingEngine(SnappingEngine snappingEngine)
Parameters
SnappingEngine
snappingEngine
|
Implements
SnapItems(IEnumerable<IDiagramItem>, Point)
Snaps the new dragging position.
Declaration
public virtual Point SnapItems(IEnumerable<IDiagramItem> selectedItems, Point newPosition)
Parameters
System.Collections.Generic.IEnumerable<IDiagramItem>
selectedItems
The selected items. |
Point
newPosition
The new position. |
Returns
Point
|
Implements
SnapPoint(Point)
Snaps point.
Declaration
public virtual Point SnapPoint(Point point)
Parameters
Point
point
The point to snap. |
Returns
Point
The snapped point. |
Implements
Events
SnappingLinesCalculated
Occurs when snapping lines have been calculated.
Declaration
public event EventHandler<SnappingLinesCalculatedEventArgs> SnappingLinesCalculated
Event Type
System.EventHandler<SnappingLinesCalculatedEventArgs>
|