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

■ DrawingBrush 엘리먼트 : 격자 브러시 만들기

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


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="DrawingBrush 엘리먼트 : 격자 브러시 만들기"

    FontFamily="나눔고딕코딩"

    FontSize="16">

    <Ellipse

        HorizontalAlignment="Center"

        VerticalAlignment="Center"

        Width="300"

        Height="300"

        Stroke="DarkGray"

        StrokeThickness="1">

        <Ellipse.Fill>

            <DrawingBrush

                Viewport="0 0 10 10"

                ViewportUnits="Absolute"

                TileMode="Tile">

                <DrawingBrush.Drawing>

                    <DrawingGroup>

                        <DrawingGroup.Children>

                            <GeometryDrawing

                                Brush="#66ccccff"

                                Geometry="M 0 0 L 1 0 1 0.1 0 0.1 Z" />

                            <GeometryDrawing

                                Brush="#66ccccff"

                                Geometry="M 0 0 L 0 1 0.1 1 0.1 0 Z" />

                        </DrawingGroup.Children>

                    </DrawingGroup>

                </DrawingBrush.Drawing>

            </DrawingBrush>

        </Ellipse.Fill>

    </Ellipse>

</Window>

 

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

Posted by 사용자 icodebroker

댓글을 달아 주세요