Control.BorderThickness Control.BorderThickness Control.BorderThickness Control.BorderThickness Property

정의

컨트롤의 테두리 두께를 가져오거나 설정합니다.Gets or sets the border thickness of a control.

public:
 property System::Windows::Thickness BorderThickness { System::Windows::Thickness get(); void set(System::Windows::Thickness value); };
[System.ComponentModel.Bindable(true)]
public System.Windows.Thickness BorderThickness { get; set; }
member this.BorderThickness : System.Windows.Thickness with get, set
Public Property BorderThickness As Thickness

속성 값

두께 값이며 기본 값은 네 면 모두 0입니다.A thickness value; the default is a thickness of 0 on all four sides.

예제

다음 예제에서는 컨트롤의 테두리 두께 속성을 설정 하는 방법을 보여 줍니다.The following example shows how to set the border thickness property of a control.

<Button Name="btn9" BorderThickness="5.0" 
        Click="ChangeBorderThickness" TabIndex="2">
  BorderThickness
</Button>
void ChangeBorderThickness(object sender, RoutedEventArgs e)
{
    if (btn9.BorderThickness.Left == 5.0)
    {
        btn9.BorderThickness = new Thickness(2.0);
        btn9.Content = "Control BorderThickness changes from 5 to 2.";

    }
    else
    {
        btn9.BorderThickness = new Thickness(5.0);
        btn9.Content = "BorderThickness";
    }
}
Private Sub ChangeBorderThickness(ByVal Sender As Object, ByVal e As RoutedEventArgs)

    If (btn9.BorderThickness.Left = 5.0) Then
        btn9.BorderThickness = New Thickness(2.0)
        btn9.Content = "Control BorderThickness changes from 5 to 2."

    Else
        btn9.BorderThickness = New Thickness(5.0)
        btn9.Content = "BorderThickness"
    End If

End Sub

설명

이 속성에만 해당 템플릿을 사용 하 여 컨트롤을 적용 합니다 BorderThickness 매개 변수로 속성입니다.This property only affects a control whose template uses the BorderThickness property as a parameter. 다른 컨트롤에 대해이 속성이 아무런 영향이 없습니다.On other controls, this property has no impact.

종속성 속성 정보Dependency Property Information

식별자 필드Identifier field BorderThicknessProperty
메타 데이터 속성 설정 trueMetadata properties set to true AffectsMeasure, AffectsRenderAffectsMeasure, AffectsRender

적용 대상