Border.CornerRadius Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that represents the degree to which the corners of a Border are rounded.
public:
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
Property Value
The CornerRadius that describes the degree to which corners are rounded. This property has no default value.
Examples
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">
Remarks
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 |
Metadata properties set to true |
AffectsMeasure, AffectsRender |
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기