확장 최소화
이 항목은 아직 평가되지 않았습니다.- 이 항목 평가

TextDecorationLocation 열거형

업데이트: 2007년 11월

TextDecoration 개체의 세로 위치를 지정합니다.

네임스페이스:  System.Windows
어셈블리:  PresentationCore(PresentationCore.dll)

public enum TextDecorationLocation
public enum TextDecorationLocation
public enum TextDecorationLocation
<object property="enumerationValue" .../>
멤버 이름설명
Underline밑줄의 세로 위치입니다. 이는 기본값입니다.
OverLine윗줄의 세로 위치입니다.
Strikethrough취소선의 세로 위치입니다.
Baseline기준선의 세로 위치입니다.

기준선, 윗줄, 취소선 및 밑줄의 네 가지 텍스트 장식을 사용할 수 있습니다. 다음 예제에서는 텍스트를 기준으로 텍스트 장식의 위치를 보여 줍니다.

텍스트 장식의 종류

텍스트 장식 위치의 다이어그램

다음 예제에서는 밑줄 텍스트 장식을 만들고 단색 브러시를 펜으로 사용합니다.

// Use a Red pen for the underline text decoration.
private void SetRedUnderline()
{
    // Create an underline text decoration. Default is underline.
    TextDecoration myUnderline = new TextDecoration();

    // Create a solid color brush pen for the text decoration.
    myUnderline.Pen = new Pen(Brushes.Red, 1);
    myUnderline.PenThicknessUnit = TextDecorationUnit.FontRecommended;

    // Set the underline decoration to a TextDecorationCollection and add it to the text block.
    TextDecorationCollection myCollection = new TextDecorationCollection();
    myCollection.Add(myUnderline);
    TextBlock2.TextDecorations = myCollection;
}


<!-- Use a Red pen for the underline text decoration -->
<TextBlock
  FontSize="36" >
  jumped over
  <TextBlock.TextDecorations>
    <TextDecorationCollection>
      <TextDecoration 
        PenThicknessUnit="FontRecommended">
        <TextDecoration.Pen>
          <Pen Brush="Red" Thickness="1" />
        </TextDecoration.Pen>
      </TextDecoration>
    </TextDecorationCollection>
  </TextBlock.TextDecorations>
</TextBlock>


Windows Vista

.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.

.NET Framework

3.5, 3.0에서 지원
이 정보가 도움이 되었습니까?
(1500자 남음)

커뮤니티 추가 항목

추가
© 2013 Microsoft. All rights reserved.