TextBlock.TextDecorations 속성

정의

TextDecorationCollection의 텍스트에 적용되는 효과가 들어 있는 TextBlock을 가져오거나 설정합니다.

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 특성입니다.

<TextBlock TextDecorations="Strikethrough">
  This text will render with the strikethrough effect.
</TextBlock>

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

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

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

스크린 샷: 윗줄 TextDecorator

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

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

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

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

설명

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

기본적으로이 속성 설정 null 없음 TextDecorationCollection 연관 됩니다. 텍스트 효과 추가 하기 전에 만들 새 TextDecorationCollection 이 속성에 할당 합니다.

종속성 속성 정보

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

적용 대상