반응형
<Window x:Class="WpfApplication15.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="550" Width="525"> <Grid> <StackPanel> <Line X1="30" Y1="30" X2 ="180" Y2="30" Stroke="Blue" StrokeThickness="2"/> <Path Stroke="Blue" StrokeThickness="2"> <Path.Data> <LineGeometry StartPoint="60 60" EndPoint="280 60"/> </Path.Data> </Path> <Rectangle Fill="Gray" Stroke="Blue" StrokeThickness="2" Width="10" Height="20" Margin="10"/> <Path Fill="Gray" Stroke="Blue" StrokeThickness="2" Margin="10"> <Path.Data> <RectangleGeometry Rect="280,20,10,20" /> </Path.Data> </Path> <Ellipse Fill="Gray" Stroke="Blue" StrokeThickness="2" Width="10" Height="20"/> <Path Fill="Gray" Stroke="Blue" StrokeThickness="2"> <Path.Data> <EllipseGeometry RadiusX="5" RadiusY="10" Center="280,20"/> </Path.Data> </Path> <Path Fill="LightGray" Stroke="Blue" StrokeThickness="2"> <Path.Data> <GeometryGroup FillRule="Nonzero"> <EllipseGeometry RadiusX="50" RadiusY="50" Center="120,120"/> <EllipseGeometry RadiusX="30" RadiusY="30" Center="120,120"/> <EllipseGeometry RadiusX="10" RadiusY="10" Center="120,120"/> </GeometryGroup> </Path.Data> </Path> </StackPanel> </Grid> </Window>
reference : Practical WPF Graphics Programming
'.NET > WPF 2D' 카테고리의 다른 글
WPF 2D Bezier Curve (0) | 2013.07.11 |
---|---|
WPF 2D PathGeometry Class (0) | 2013.07.11 |
WPF 2D Combined Geometry (0) | 2013.07.11 |
WPF 2D Geometry Group (0) | 2013.07.11 |
WPF 2D Composite Transforms (0) | 2013.07.04 |
WPF 2D SkewTransform (0) | 2013.07.04 |
WPF 2D RotateTransform (0) | 2013.07.04 |
WPF 2D TranslateTransform (0) | 2013.07.03 |