ClassSnappingService
This class is accountable for calculating snapping related transformations for position and size.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.Windows.Diagrams.Core.dll
Syntax:
public class SnappingService : GraphServiceBase, ISnappingService
Inheritance: objectGraphServiceBaseSnappingService
Implements:
Inherited Members
Constructors
SnappingService(IGraphInternal)
Initializes a new instance of the SnappingService class.
Declaration
public SnappingService(IGraphInternal graph)
Parameters
graph
The graph.
Methods
ClearSnap()
Clears after the snap action.
Declaration
public virtual void ClearSnap()
Implements
InitializeSnap(IEnumerable<IShape>, IDiagramItem, bool, bool, Point)
Initializes the snap action.
Declaration
public virtual 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.
Implements
SetSnappingEngine(SnappingEngine)
Changes the snapping engine.
Declaration
public virtual void SetSnappingEngine(SnappingEngine snappingEngine)
Parameters
snappingEngine
Implements
SnapItems(IEnumerable<IDiagramItem>, Point)
Snaps the new dragging position.
Declaration
public virtual Point SnapItems(IEnumerable<IDiagramItem> selectedItems, Point newPosition)
Parameters
selectedItems
The selected items.
newPosition
Point
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 Value
Implements