■ LineSegment 엘리먼트를 사용해 사각형을 그리는 방법을 보여준다.
▶ 예제 코드 (XAML)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<Path StrokeThickness="10" Stroke="Blue"> <Path.Data> <PathGeometry> <PathGeometry.Figures> <PathFigure StartPoint="0 0" IsClosed="True"> <PathFigure.Segments> <LineSegment Point="100 0" /> <LineSegment Point="100 100" /> <LineSegment Point="0 100" /> </PathFigure.Segments> </PathFigure> </PathGeometry.Figures> </PathGeometry> </Path.Data> </Path> |