CornerRadius Structure
Represents the radii of a rectangle's corners.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
'Declaration <TypeConverterAttribute(GetType(CornerRadiusConverter))> _ Public Structure CornerRadius _ Implements IEquatable(Of CornerRadius) 'Usage Dim instance As CornerRadius
<CornerRadius .../>
<object property="TopLeft,TopRight,BottomRight,BottomLeft "/> - or - <object property="AllCorners"/>
XAML Values
Note: |
|---|
Values need not include the decimal point explicitly when specified as a string. The string "1" provided in XAML evaluates to a value of 1.0 when referenced in code. |
This class has four properties, TopLeft, TopRight, BottomLeft, and BottomRight, corresponding to the individual corners of the rectangle. Each is a Double structure that can be set independently of the others.
The radii cannot be negative.
The following example shows how to set the value of the CornerRadius property by using Extensible Application Markup Language (XAML) and code.
Dim myBorder1 As New Border() myBorder1.BorderBrush = Brushes.SlateBlue myBorder1.BorderThickness = New Thickness(5, 10, 15, 20) myBorder1.Background = Brushes.AliceBlue myBorder1.Padding = New Thickness(5) myBorder1.CornerRadius = New CornerRadius(15)
<Border BorderBrush="SlateBlue" BorderThickness="5,10,15,20" Background="AliceBlue" Padding="5" CornerRadius="15">
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note: