DashStyle.Dashes 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
이 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있습니다.
예제
다음 예에서는 a의 DashStylePen 속성을 사용하여 텍스트 아래에 파선이 있는 줄을 만드는 방법을 보여줍니다.
<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길이 대시()와 길이 간격(21 * Thickness2 * )을 지정합니다.Thickness
메모
그려지는 대시의 실제 길이는 대시의 DashCap 각 끝에 추가되는 스타일에 따라 달라집니다. 의 기본값 DashCapPen 은 .입니다 Square. 이렇게 하면 줄 두께의 절반인 끝 캡이 펜 스트로크의 각 끝에 추가됩니다. (예제를 참조하세요PenLineCap.) 따라서 배열 02 과 정사각형DashCap을 지정하는 경우 실제 대시 길이는 (0 * Thickness) + (2 * DashCap)입니다.
컬렉션에 홀수 값이 있는 경우 값은 짝수 값을 생성하기 위해 한 번 반복된 것처럼 해석됩니다. 예를 들어 ,23를 포함하는 5컬렉션은 ,2,,,3523를 포함하는 5컬렉션과 동일하게 해석됩니다.
배열의 음수 값은 절대값으로 해석됩니다.
종속성 속성 정보
| 항목 | 가치 |
|---|---|
| 식별자 필드 | DashesProperty |
메타데이터 속성이 다음으로 설정됩니다. true |
None |