Pen.DashStyle 속성

정의

Pen에 의해 생성된 대시의 패턴을 설명하는 값을 가져오거나 설정합니다.

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

속성 값

DashStyle

Pen에 의해 생성된 대시의 패턴을 설명하는 값입니다. 기본값은 Solid로, 대시가 없음을 나타냅니다.

예제

다음 예제에서는 사용 하는 방법을 보여 줍니다 합니다 DashStyle 의 속성을 Pen 파선 아래 텍스트를 만들려면.

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
  <StackPanel Margin="20">

    <TextBlock FontSize="36">
      the lazy brown dog.
      <TextBlock.TextDecorations>
        <TextDecoration Location="Underline"  
          PenThicknessUnit="FontRecommended">
          <TextDecoration.Pen>
            <Pen Thickness="1.5" Brush="Red" >

              <!-- For the underline, create a dashed line with each
                   dash twice the thickness of the Pen and each gap 8 times
                   the thickness of the Pen. -->
              <Pen.DashStyle>
                <DashStyle Dashes="2,8"/>
              </Pen.DashStyle>
            </Pen>
          </TextDecoration.Pen>
        </TextDecoration>
      </TextBlock.TextDecorations>
    </TextBlock>
  </StackPanel>
</Page>

설명

DashStyles 클래스는 미리 정의 된 대시 패턴의 집합을 제공 합니다.

종속성 속성 정보

식별자 필드 DashStyleProperty
메타 데이터 속성 설정 true 없음

적용 대상

추가 정보