Version

RectFromPoints Method

Helper method for returning a normalized System.Windows.Rect based on two points.
Syntax
'Declaration
 
Public Shared Function RectFromPoints( _
   ByVal point1 As Point, _
   ByVal point2 As Point _
) As Rect
public static Rect RectFromPoints( 
   Point point1,
   Point point2
)

Parameters

point1
A point that represents a corner of the rect
point2
A point that represents the corner of the rect opposite that of point1

Return Value

A normalized rect based on the specified points. For example, the System.Windows.Rect.X will be smaller of the System.Windows.Point.X of the point1 and point2.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also