Freigeben über


RectangleGeometry.Rect Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the dimensions of the rectangle.

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Property Rect As Rect
public Rect Rect { get; set; }
<RectangleGeometry Rect="Rect"/>

Property Value

Type: System.Windows.Rect
The Rect structure that describes the position and size of the rectangle. The default is nulla null reference (Nothing in Visual Basic).

Remarks

Dependency property identifier field: RectProperty

The XAML attribute syntax for Rect is in the form Rect="x,y,width,height". For details on the Rect attribute syntax, see Rect.

The x,y origin point and the width,height dimensions of a Rect can all be specified as negative values. For details, see Rect.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.