FromLocationAndSize method

RectHelper.FromLocationAndSize method

[ Updated for UWP apps on Windows 10. For Windows 8.x articles, see the archive ]

Creates a new Rect value based on a Point that specifies the upper-left origin, and a Size that specifies the width and height. C# and Microsoft Visual Basic code should use Rect(Point,Size) instead.

Syntax


public static Rect FromLocationAndSize(
  Point location, 
  Size size
)

Parameters

location

Type: Point

The Point location of the origin (upper left).

size

Type: Size

The Size that specifies width and height.

Return value

Type: Rect

The created Rect value.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

RectHelper

 

 

Show:
© 2016 Microsoft