Blog Content

    티스토리 뷰

    25.SilverLight3 - Geometry : PathGeometry

    반응형



    MainPage.xaml

    [그림 25-1]


    <Grid x:Name="LayoutRoot" Background="White">

            <Path Fill="Red" Stroke="Black" StrokeThickness="5">

                <Path.Data>

                    <PathGeometry>                   

                        <PathFigure StartPoint="20,20" IsClosed="True">

                            <LineSegment Point="20, 100"></LineSegment>

                            <LineSegment Point="100, 100"></LineSegment>

                        </PathFigure>

                    </PathGeometry>

                </Path.Data>

            </Path>

    </Grid>



    응용예제입니다.
    FrmPathGeometry.xaml

    [그림 25-2]


    <Grid x:Name="LayoutRoot" Background="White">

            <Path Fill="Red" Stroke="Black" StrokeThickness="5">

                <Path.Data>

                    <PathGeometry>

                        <PathFigure StartPoint="20,20" IsClosed="True">

                            <LineSegment Point="20, 100"></LineSegment>

                            <LineSegment Point="100, 100"></LineSegment>

                        </PathFigure>

     

                        <PathFigure StartPoint="90,20" IsClosed="True">

                            <LineSegment Point="20, 100"></LineSegment>

                            <LineSegment Point="100, 100"></LineSegment>

                        </PathFigure>

                    </PathGeometry>

                </Path.Data>

            </Path>

    </Grid>



    반응형

    Comments