Interface ISnappingService
The service handling the snapping of diagram items.
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core.dll
Syntax
public interface ISnappingService
Remarks
Note that this service can be customized and plugged into the ServiceLocator.
Methods
ClearSnap()
Clears after the snap action.
Declaration
void ClearSnap()
InitializeSnap(IEnumerable<IShape>, IDiagramItem, Boolean, Boolean, Point)
Initializes the snap action.
Declaration
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. |
System.Windows.Point
initialPosition
The initial position. |
SetSnappingEngine(SnappingEngine)
Changes the snapping engine.
Declaration
void SetSnappingEngine(SnappingEngine snappingEngine)
Parameters
SnappingEngine
snappingEngine
|
SnapItems(IEnumerable<IDiagramItem>, Point)
Snaps the new dragging position.
Declaration
Point SnapItems(IEnumerable<IDiagramItem> selectedItems, Point newPosition)
Parameters
System.Collections.Generic.IEnumerable<IDiagramItem>
selectedItems
The selected items. |
System.Windows.Point
newPosition
The new position. |
Returns
System.Windows.Point
|
SnapPoint(Point)
Snaps point.
Declaration
Point SnapPoint(Point point)
Parameters
System.Windows.Point
point
The point to snap. |
Returns
System.Windows.Point
The snapped point. |
Events
SnappingLinesCalculated
Occurs when snapping lines have been calculated.
Declaration
event EventHandler<SnappingLinesCalculatedEventArgs> SnappingLinesCalculated
Event Type
System.EventHandler<SnappingLinesCalculatedEventArgs>
|