Skip to content

Latest commit

 

History

History
51 lines (40 loc) · 2.17 KB

control_cornerradius.md

File metadata and controls

51 lines (40 loc) · 2.17 KB
-api-id -api-type ms.custom
P:Windows.UI.Xaml.Controls.Control.CornerRadius
winrt property
RS5

Windows.UI.Xaml.Controls.Control.CornerRadius

-description

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

-xaml-syntax

<control CornerRadius="uniformRadius"/>
- or -
<control CornerRadius="topLeft,topRight,bottomRight,bottomLeft"/>

-xaml-values

uniformRadius
uniformRadiusA value that specifies a uniform radius size in pixels. The uniformRadius value is applied to all four CornerRadius values.
topLeft
topLeftSets the initial TopLeft value.
topRight
topRightSets the initial TopRight value.
bottomRight
bottomRightSets the initial BottomRight value.
bottomLeft
bottomLeftSets the initial BottomLeft value.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

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

-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).

-examples

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

-see-also

Border.CornerRadius