업데이트: 2007년 11월
이 예제에서는 열린 Shape 요소의 시작 또는 끝 모양을 수정하는 방법을 보여 줍니다. 열린 Shape 시작 부분의 끝 모양을 변경하려면 StrokeStartLineCap 속성을 사용합니다. 열린 Shape 끝 부분의 끝 모양을 변경하려면 StrokeEndLineCap 속성을 사용합니다. 사용 가능한 선의 끝 모양을 보려면 PenLineCap 열거형을 참조하십시오.
다음 예제에서는 네 개의 Polyline 요소를 그리고, 각 끝에 서로 다른 도형 집합을 사용합니다.
예제
<TextBlock Grid.Column="3" Grid.Row="0" Grid.ColumnSpan="2">
<Bold>Line Caps</Bold>
</TextBlock>
<TextBlock Grid.Column="3" Grid.Row="1">Flat</TextBlock>
<Polyline
Points="50,50 75,30 100,100 130,40"
Stroke="Red"
StrokeThickness="20"
StrokeStartLineCap="Flat"
StrokeEndLineCap="Flat"
Grid.Row="1" Grid.Column="4"/>
<TextBlock Grid.Column="3" Grid.Row="2">Square</TextBlock>
<Polyline
Points="50,50 75,30 100,100 130,40"
Stroke="Red"
StrokeThickness="20"
StrokeStartLineCap="Square"
StrokeEndLineCap="Square"
Grid.Row="2" Grid.Column="4"/>
<TextBlock Grid.Column="3" Grid.Row="3">Round</TextBlock>
<Polyline
Points="50,50 75,30 100,100 130,40"
Stroke="Red"
StrokeThickness="20"
StrokeStartLineCap="Round"
StrokeEndLineCap="Round"
Grid.Row="3" Grid.Column="4"/>
<TextBlock Grid.Column="3" Grid.Row="4">Triangle</TextBlock>
<Polyline
Points="50,50 75,30 100,100 130,40"
Stroke="Red"
StrokeThickness="20"
StrokeStartLineCap="Triangle"
StrokeEndLineCap="Triangle"
Grid.Row="4" Grid.Column="4"/>
이 예제는 보다 큰 샘플의 일부입니다. 전체 샘플은 Shape 요소 샘플을 참조하십시오.