Tries to snap the specified objects to other objects in the display when moving the specified objects.

Namespace: Ico.Gwx
Assembly: GwxConfigCore (in GwxConfigCore.dll) Version: 10.97.212.0 (10.97.212.00)

Syntax

C#
public bool TrySnapToObjects(
	IList<GwxElement> sourceElements,
	Vector offset,
	out Point snappedPoint,
	out Vector snappedOffset,
	out string pointDescription,
	out List<Point> potentialPoints
)
Visual Basic
Public Function TrySnapToObjects ( _
	sourceElements As IList(Of GwxElement), _
	offset As Vector, _
	<OutAttribute> ByRef snappedPoint As Point, _
	<OutAttribute> ByRef snappedOffset As Vector, _
	<OutAttribute> ByRef pointDescription As String, _
	<OutAttribute> ByRef potentialPoints As List(Of Point) _
) As Boolean
JScript
public function TrySnapToObjects(
	sourceElements : IList<GwxElement>, 
	offset : Vector, 
	snappedPoint : Point, 
	snappedOffset : Vector, 
	pointDescription : String, 
	potentialPoints : List<Point>
) : boolean

Parameters

sourceElements
Type: System.Collections.Generic..::..IList<(Of <(<'GwxElement>)>)>
The objects being moved/resized.
offset
Type: System.Windows..::..Vector
The amount by which sourceElements are being moved.
snappedPoint
Type: System.Windows..::..Point%
Returns the point that was snapped to. If no snapping occurred, returns Point(NaN,NaN).
snappedOffset
Type: System.Windows..::..Vector%
Returns the offset modified for snapping. If no snapping occurred, returns the original offset.
pointDescription
Type: System..::..String%
Returns a description for the snapped point. If no snapping occurred, returns null.
potentialPoints
Type: System.Collections.Generic..::..List<(Of <(<'Point>)>)>%
Returns custom snap points that might be of interest to the user (custom snap points that are "near" the sourceElements). Returns null if there are no potential points.

Return Value

Returns true if object-to-object snapping occurred. Returns false if no snapping occurred (i.e. there were no nearby objects to snap to).

See Also