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 Snapping
Declaration
public SnappingService(IGraphInternal graph)
Parameters
IGraph 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. The static items - the items that you don't drag at the moment. |
IDiagram The main item - the item that drag started from. |
System. The is snap to items enabled. |
System. 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
Snapping
|
Implements
SnapItems(IEnumerable<IDiagramItem>, Point)
Snaps the new dragging position.
Declaration
public virtual Point SnapItems(IEnumerable<IDiagramItem> selectedItems, Point newPosition)
Parameters
System. The selected items. |
Point
newPosition
The new position. |
Returns
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.
|