RectExtensionsGetNearestDistance Method Document Toolkit Help
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: (

public static double GetNearestDistance(
	this Rect rect,
	Point p


Type: System.WindowsRect
The rect.
Type: System.WindowsPoint
The p.

Return Value

Type: Double
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 Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also