CornerRadius Property
Collapse the table of content
Expand the table of content

Border.CornerRadius Property

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

Gets or sets the radius for the corners of the border.

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

public CornerRadius CornerRadius { get; set; }
<Border CornerRadius="uniformRadius"/>
- or -
<Border CornerRadius="topLeft,topRight,bottomRight,bottomLeft"/>

XAML Values


A value that specifies a uniform radius size in logical pixels. The uniformRadius value is applied to all four CornerRadius properties (TopLeft, TopRight, BottomRight, BottomLeft).


Sets the initial TopLeft.


Sets the initial TopRight.


Sets the initial BottomRight.


Sets the initial BottomLeft.

  • If you specify an attribute string with two or three values, only the first value is respected and is treated as the uniformRadius (the other values are ignored). You must specify all four values to use a different behavior than uniformRadius.

  • In the XAML syntaxes shown, you can use a space rather than a comma as the delimiter between values.

Property Value

Type: System.Windows.CornerRadius
The degree to which the corners are rounded.

Dependency property identifier field: CornerRadiusProperty

CornerRadius can be a single uniform value for all corners or four unique values. For more information, see CornerRadius.

The following example shows how to set the corners to be rounded.

<Border Background="Cyan" CornerRadius="20" Grid.Column="2" Grid.Row="2">
    <TextBlock Text="Background Brush" TextWrapping="Wrap" VerticalAlignment="Center" />

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2017 Microsoft