TextBox.TextDecorations 속성

정의

텍스트 상자에 적용되는 텍스트 장식을 가져옵니다.

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

속성 값

TextDecorationCollection

텍스트 상자에 적용되는 텍스트 장식이 들어 있는 TextDecorationCollection 컬렉션입니다. 기본값은 null이며, 텍스트 장식이 적용되지 않습니다.

예제

다음 예제에서는 설정 하는 방법을 보여 줍니다 합니다 TextDecorations 특성을 사용 하 여 Run 를 예제 요소로 합니다.

<FlowDocument ColumnWidth="200">
  <Paragraph>
    <Run TextDecorations="Strikethrough">
      This text will render with the strikethrough effect.
    </Run>
  </Paragraph>
</FlowDocument>

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

스크린 샷: 기본 취소선 효과가 적용된 텍스트

다음 그림 표시 하는 방법을 OverLine, Baseline, 및 Underline 장식이 각각 렌더링 합니다.

스크린 샷: 윗줄 TextDecorator

스크린 샷: 텍스트의 기본 기준선 효과

스크린 샷: 밑줄 효과가 적용된 텍스트

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

Run run1 = new Run("This text will render with the strikethrough effect.");
run1.TextDecorations = TextDecorations.Strikethrough;
Dim run1 As New Run("This text will render with the strikethrough effect.")
run1.TextDecorations = TextDecorations.Strikethrough

설명

TextDecoration 개체가 시각적 장식 텍스트를 추가할 수 있습니다. 텍스트 장식의 네 가지가: 밑줄, 기준, 취소선 및 윗줄 합니다. 텍스트 장식에 대 한 자세한 내용은 참조 하세요. 방법: 텍스트 장식 만들기합니다.

종속성 속성 정보

식별자 필드 TextDecorationsProperty
메타 데이터 속성 설정 true AffectsRender

적용 대상