DashStyle.Dashes 속성

정의

DashStyle에서 대시 및 간격 컬렉션을 가져오거나 설정합니다.

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

속성 값

DoubleCollection

대시 및 간격의 컬렉션입니다. 기본값은 빈 DoubleCollection입니다.

예제

다음 예제에서는 사용 하는 방법을 보여 줍니다 합니다 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>

설명

이 컬렉션의 대시 및 간격을 교대로 반복 되는 길이 설명 합니다. 여러 측면에서 컬렉션에 있는 값은는 ThicknessPen합니다. 예를 들어 배열을 1,2 대시 길이 지정 합니다 (1 * Thickness) 길이의 간격 뒤에 (2 * Thickness).

참고

스타일에 그려진 대시의 실제 길이 따라 달라 집니다 DashCap 는 대시의 양쪽 끝에 추가 됩니다. 기본값 DashCap 에 대 한 값을 PenSquare합니다. 이렇게 하면 끝 캡 절반 펜 스트로크의 각 끝에 추가할 선의 두께입니다. 예제는 PenLineCap을 참조하세요. 따라서 배열을 지정 하는 경우 0, 2 정사각형 DashCap, 실제 대시 길이 됩니다 (0 * Thickness) + (2 * DashCap).

컬렉션의 값 수가 홀수인 경우 값이 짝수 값을 생성 하기 위해 한 번 반복 된 것 처럼 해석 됩니다. 예를 들어, 포함 하는 컬렉션 2,3,5 는 포함 하는 컬렉션 같은 해석 2,35,23,5합니다.

배열에 음수 값은 절대 값으로 해석 됩니다.

종속성 속성 정보

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

적용 대상