Border.CornerRadius プロパティ


Border の角の丸みの程度を表す値を取得または設定します。Gets or sets a value that represents the degree to which the corners of a Border are rounded.

 property System::Windows::CornerRadius CornerRadius { System::Windows::CornerRadius get(); void set(System::Windows::CornerRadius value); };
public System.Windows.CornerRadius CornerRadius { get; set; }
member this.CornerRadius : System.Windows.CornerRadius with get, set
Public Property CornerRadius As CornerRadius



角の丸みの程度を表す CornerRadiusThe CornerRadius that describes the degree to which corners are rounded. このプロパティに既定値はありません。This property has no default value.

次の例は、このプロパティの値を設定する方法を示しています。The following example shows how to set the value of this property.

myBorder1 = 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);
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">


プロパティ名は単数形の値のみを使用できることを示していますが、CornerRadius 均一でない半径もサポートしています。Although the property name suggests that you can use only singular values, CornerRadius also supports non-uniform radii. 半径の値が大きすぎると、角が滑らかになるようにスケーリングされます。Radius values that are too large are scaled so that they blend smoothly from corner to corner.

依存プロパティ情報Dependency Property Information

識別子フィールドIdentifier field CornerRadiusProperty
メタデータプロパティが true に設定されるMetadata properties set to true AffectsMeasure, AffectsRenderAffectsMeasure, AffectsRender