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