Gets the nearest distance from specified point to the closest border of specified rectangle.

Namespace: FirstFloor.Documents
Assembly: FirstFloor.Documents (in FirstFloor.Documents.dll) Version: 2.5.0.0 (2.5.1.0)

Syntax

C#
public static double GetNearestDistance(
	this Rect rect,
	Point p
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function GetNearestDistance ( _
	rect As Rect, _
	p As Point _
) As Double
Visual C++
[ExtensionAttribute]
public:
static double GetNearestDistance(
	Rect rect, 
	Point p
)

Parameters

rect
Type: System.Windows..::..Rect
The rect.
p
Type: System.Windows..::..Point
The p.

Return Value

The nearest distance from point to rectangle.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Rect. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also