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.

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
Windows App SDK 0.8, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6

See also