RectangleGeometry.RadiusX Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets the x-radius of the ellipse that is used to round the corners of the rectangle.

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

Syntax

Public Property RadiusX As Double
public double RadiusX { get; set; }
<RectangleGeometry RadiusX="double"/>

Property Value

Type: System..::.Double
The x-radius of the ellipse used to round the corners of the rectangle geometry. The default is 0.

Remarks

Dependency property identifier field: RadiusXProperty

For the rectangle to have rounded corners, both the RadiusX and RadiusY properties must be nonzero.

A value greater than or equal to zero and less than or equal to half the rectangle's width that describes the x-radius of the ellipse is used to round the corners of the rectangle. A value greater than half the rectangle's width is treated as though equal to half the rectangle's width. A negative value is treated as a positive value.

The following illustration shows three rectangles with varying degrees of rounded corners.

Rectangles with different RadiusX/RadiusY settings

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

RectangleGeometry Class

System.Windows.Media Namespace

RadiusY