ListItem.BorderThickness 속성

정의

요소의 테두리 두께를 가져오거나 설정합니다.

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

속성 값

적용할 테두리의 크기(디바이스 독립적 픽셀)를 지정하는 Thickness 구조체입니다. 기본값은 0의 균일 두께(0.0)입니다.

예제

다음 예제에서는 설정 하는 방법을 보여 줍니다 합니다 BorderThickness 특성을 Block 요소 (Paragraph).

<FlowDocument>
  <Paragraph Name="par"
    BorderBrush="Blue"
    BorderThickness="0.25in"
  >
    <Run>
      Child elements in this Block element (Paragraph) will be surrounded by a blue border.
    </Run>
    <LineBreak/><LineBreak/>
    <Run>
      This border will be one quarter inch thick in all directions.
    </Run>
  </Paragraph>
</FlowDocument>

다음 그림은 이 예제에서 렌더링하는 방법을 보여줍니다.

스크린샷: 블록 스크린샷 주위의 파란색, 1/4인치 테두리

다음 예제에서는 설정 하는 방법의 BorderThickness 속성 프로그래밍 방식으로 합니다.

Paragraph par = new Paragraph();

Run run1 = new Run("Child elements in this Block element (Paragraph) will be surrounded by a blue border.");
Run run2 = new Run("This border will be one quarter inch thick in all directions.");

par.Inlines.Add(run1);
par.Inlines.Add(run2);

par.BorderBrush = Brushes.Blue;
ThicknessConverter tc = new ThicknessConverter();
par.BorderThickness = (Thickness)tc.ConvertFromString("0.25in");
Dim par As New Paragraph()

Dim run1 As New Run("Child elements in this Block element (Paragraph) will be surrounded by a blue border.")
Dim run2 As New Run("This border will be one quarter inch thick in all directions.")

par.Inlines.Add(run1)
par.Inlines.Add(run2)

par.BorderBrush = Brushes.Blue
Dim tc As New ThicknessConverter()
par.BorderThickness = CType(tc.ConvertFromString("0.25in"), Thickness)

설명

XAML 특성 사용

<object BorderThickness="uniformThickness"/>  
- or -  
<object BorderThickness="independentThickness"/>  
- or -  
<object BorderThickness="qualifiedUniformThickness"/>  
- or -  
<object BorderThickness="qualifiedIndependentThickness"/>  

XAML 값

uniformThickness
단일의 문자열 표현 Double 네 가지 두께 균일 하 게 적용할 값입니다. 예를 들어, 값 "10" 의 값과 동일 "10,10,10,10"합니다. 값을 정규화 되지 않은 디바이스 독립적 픽셀 단위로 측정 됩니다. 문자열 소수점이 하를 명시적으로 포함 되지 해야 합니다.

independentThickness
순서가 지정 된 4의 문자열 표현 Double 왼쪽, 위쪽에 대 한 독립적인 두께에 해당 하는 값 오른쪽이 순서 대로 아래쪽 합니다. 4 개 값; 쉼표로 구분 해야 합니다. 공백은 허용 되지 않습니다. 예를 들어, "5,10,15,20" 결과 5 픽셀 테두리 왼쪽의 콘텐츠, 콘텐츠 위쪽 테두리의 10 픽셀, 콘텐츠, 오른쪽 테두리의 15 픽셀 및 콘텐츠 아래쪽 테두리의 20 픽셀입니다.

qualifiedUniformThickness
uniformThickness 다음에 다음 단위 지정자 중 하나로 설명된 값입니다px. , in.

px (기본값)은 디바이스 독립적 단위(단위당 1/96인치)입니다.

in 인치; 1에서 96px = =

예를 들어 "1in" 모든 방향으로 1 인치의 uniform 테두리를 제공 합니다.

qualifiedIndependentThickness
independentThickness로 설명된 값이며, 각 독립 값 뒤에 다음 단위 지정자 px중 하나가 잇습니다. , in.

px (기본값)은 디바이스 독립적 단위(단위당 1/96인치)입니다.

in 인치; 1에서 96px = =

예들 들어 "1.5in,0.8in,1.5in,0.8in"입니다. 단위 지정자 혼합 또는 하나 이상의 값에서 생략 되었을 수 있습니다.

종속성 속성 정보

식별자 필드 BorderThicknessProperty
메타 데이터 속성 설정 true AffectsMeasure

적용 대상

추가 정보