첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
본 블로그는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 블로그 콘텐츠 향상을 위해 쓰여집니다.

728x90
반응형
728x170

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 엘리먼트 : Drawing 속성을 사용해 물고기 브러시 만들기"
    FontFamily="나눔고딕코딩"
    FontSize="16">
    <Grid Margin="10">
        <Grid.Background>
            <DrawingBrush>
                <DrawingBrush.Drawing>
                    <DrawingGroup>
                        <GeometryDrawing Brush="Pink">
                            <GeometryDrawing.Geometry>
                                <RectangleGeometry Rect="0 0 200 100" />
                            </GeometryDrawing.Geometry>
                        </GeometryDrawing>
                        <GeometryDrawing Brush="Aqua">
                            <GeometryDrawing.Pen>
                                <Pen
                                    Brush="Blue"
                                    Thickness="2"
                                    LineJoin="Round" />
                            </GeometryDrawing.Pen>
                            <GeometryDrawing.Geometry>
                                <GeometryGroup>
                                    <PathGeometry>
                                        <PathFigure
                                            IsClosed="True"
                                            IsFilled="True"
                                            StartPoint="200 0">
                                            <BezierSegment
                                                Point1="150 100"
                                                Point2="50 -50"
                                                Point3="0 50" />
                                            <BezierSegment
                                                Point1="50 150"
                                                Point2="150 0"
                                                Point3="200 100" />
                                        </PathFigure>
                                    </PathGeometry>
                                    <EllipseGeometry
                                        Center="35 35"
                                        RadiusX="5"
                                        RadiusY="5" />
                                    <EllipseGeometry
                                        Center="165 85"
                                        RadiusX="5"
                                        RadiusY="5" />
                                </GeometryGroup>
                            </GeometryDrawing.Geometry>
                        </GeometryDrawing>
                    </DrawingGroup>
                </DrawingBrush.Drawing>
            </DrawingBrush>
        </Grid.Background>
    </Grid>
</Window>
728x90
반응형
그리드형
Posted by 사용자 icodebroker
TAG , , , ,

댓글을 달아 주세요