■ Polygon 엘리먼트를 사용해 별(star)을 그리는 방법을 보여준다.
▶ 예제 코드 (XAML)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Background="Transparent"> <UserControl.LayoutTransform> <RotateTransform Angle="0" /> </UserControl.LayoutTransform> <Canvas Width="202" Height="194"> <Polygon Stroke="Blue" StrokeThickness="5" Fill="Red" Canvas.Left="10" Canvas.Top="10" Points="91 0 147 174 0 66 182 66 35 174" /> </Canvas> </UserControl> |