Control.CornerRadius Property

Definition

Gets or sets the radius for the corners of the control's border.

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

Property Value

The degree to which the corners are rounded, expressed as values of the CornerRadius structure.

Windows requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v7.0)

Examples

XAML
<Button Content="Button" 
        Background="Blue"
        BorderThickness="1.0"
        BorderBrush="Black"
        CornerRadius="15" />

Remarks

Member components of a CornerRadius value cannot be negative.

CornerRadius property on Control behaves the same way Border.CornerRadius does. CornerRadius is a rendering artifact and does not impact layout of the contents (clipping may occur).

The default CornerRadius value in all control templates is 0. Setting the CornerRadius property impacts those controls that have a Border in their ControlTemplate (Example: Button, ComboBox).

Applies to

Product Versions
WinRT Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100

See also