첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
유용한 소스 코드가 있으면 icodebroker@naver.com으로 보내주시면 감사합니다.
블로그 자료는 자유롭게 사용하세요.

■ Viewbox 엘리먼트 사용하기

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


TestProject.zip


MainWindow.xaml

 

 

<Window x:Class="TestProject.MainWindow"

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

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

    Width="800"

    Height="600"

    Title="Viewbox 엘리먼트 사용하기"

    FontFamily="나눔고딕코딩"

    FontSize="16">

    <Viewbox>

        <Canvas

            Width="100"

            Height="100">

            <Ellipse Canvas.Left="5" Canvas.Top="5"

                Width="90"

                Height="90"

                Stroke="Black" />

            <!-- 눈 -->

            <Ellipse Canvas.Left="25" Canvas.Top="30"

                Width="10"

                Height="10"

                Stroke="Black" />

            <Ellipse Canvas.Right="25" Canvas.Top="30"

                Width="10"

                Height="10"

                Stroke="Black" />

            <!-- 눈썹 -->

            <Polyline

                Stroke="Black"

                Points="25 25, 30 20, 35 25" />

            <Polyline

                Stroke="Black"

                Points="65 25, 70 20, 75 25" />

            <!-- 코 -->

            <Polyline

                Stroke="Black"

                Points="50 40, 45 60, 55 60, 50 40" />

            <!-- 입 -->

            <Polyline

                Stroke="Black"

                Points="25 70 50 80 75 70" />

        </Canvas>

    </Viewbox>

</Window>

 

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

Posted by 사용자 icodebroker

댓글을 달아 주세요