■ PathGeometry 클래스 사용하기

------------------------------------------------------------------------------------------------------------------------


TestProject.zip


MainPage.xaml

 

 

<Page x:Class="TestProject.MainPage"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">

        <Path

            HorizontalAlignment="Center"

            VerticalAlignment="Center"

            Stroke="Red"

            StrokeThickness="12"

            StrokeLineJoin="Round">

            <Path.Data>

                <PathGeometry>

                    <!-- H -->

                    <PathFigure StartPoint="0 0">

                        <LineSegment Point="0 100" />

                    </PathFigure>

                    <PathFigure StartPoint="0 50">

                        <LineSegment Point="50 50" />

                    </PathFigure>

                    <PathFigure StartPoint="50 0">

                        <LineSegment Point="50 100" />

                    </PathFigure>

                    <!-- E -->

                    <PathFigure StartPoint="125 0">

                        <BezierSegment Point1="60 -10" Point2="60 60" Point3="125 50" />

                        <BezierSegment Point1="60  40" Point2="60 110" Point3="125 100" />

                    </PathFigure>

                    <!-- L -->

                    <PathFigure StartPoint="150 0">

                        <LineSegment Point="150 100" />

                        <LineSegment Point="200 100" />

                    </PathFigure>

                    <!-- L -->

                    <PathFigure StartPoint="225 0">

                        <LineSegment Point="225 100" />

                        <LineSegment Point="275 100" />

                    </PathFigure>

                    <!-- O -->

                    <PathFigure StartPoint="300 50">

                        <ArcSegment Size="25 50" Point="300 49.9" IsLargeArc="True" />

                    </PathFigure>

                </PathGeometry>

            </Path.Data>

        </Path>

    </Grid>

</Page>

 

------------------------------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker

댓글을 달아 주세요