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

728x90
반응형
728x170

<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Page.Resources>
        <Style TargetType="{x:Type Rectangle}">
            <Setter Property="Margin"          Value="10"    />
            <Setter Property="Width"           Value="150"   />
            <Setter Property="Height"          Value="150"   />
            <Setter Property="Stroke"          Value="Black" />
            <Setter Property="StrokeThickness" Value="1"     />
        </Style>
    </Page.Resources>
    <StackPanel
        Margin="10 10 10 10"
        Orientation="Horizontal"
        VerticalAlignment="Top">
        <Rectangle>
            <Rectangle.Fill>
                <DrawingBrush
                    TileMode="Tile"
                    Viewport="0 0 0.25 0.25">
                    <DrawingBrush.Drawing>
                        <GeometryDrawing
                            Brush="Black"
                            Geometry="M 0 0 L 0 0.5, 0.5 0.5, 0.5 1, 1 1, 1 0.5, 0.5 0.5, 0.5 0" />
                    </DrawingBrush.Drawing>
                </DrawingBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Rectangle>
            <Rectangle.Fill>
                <DrawingBrush
                    TileMode="Tile"
                    Viewport="0 0 1 1">
                    <DrawingBrush.Drawing>
                        <DrawingGroup>
                            <GeometryDrawing Brush="Pink">
                                <GeometryDrawing.Geometry>
                                    <RectangleGeometry Rect="0 0 1 1" />
                                </GeometryDrawing.Geometry>
                            </GeometryDrawing>
                            <GeometryDrawing>
                                <GeometryDrawing.Brush>
                                    <ImageBrush ImageSource="pinkcherries.jpg" />
                                </GeometryDrawing.Brush>
                                <GeometryDrawing.Geometry>
                                    <RectangleGeometry Rect="0 0 0.5 0.5" />
                                </GeometryDrawing.Geometry>
                            </GeometryDrawing>
                            <GeometryDrawing>
                                <GeometryDrawing.Brush>
                                    <ImageBrush ImageSource="pinkcherries.jpg" />
                                </GeometryDrawing.Brush>
                                <GeometryDrawing.Geometry>
                                    <RectangleGeometry Rect="0.5 0.5 0.5 0.5" />
                                </GeometryDrawing.Geometry>
                            </GeometryDrawing>
                        </DrawingGroup>
                    </DrawingBrush.Drawing>
                </DrawingBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Rectangle>
            <Rectangle.Fill>
                <DrawingBrush
                    TileMode="Tile"
                    ViewportUnits="Absolute"
                    Viewport="0 0 10 10">
                    <DrawingBrush.Drawing>
                        <DrawingGroup>
                            <GeometryDrawing Brush="White">
                                <GeometryDrawing.Geometry>
                                    <RectangleGeometry Rect="0 0 1 1" />
                                </GeometryDrawing.Geometry>
                            </GeometryDrawing>
                            <GeometryDrawing
                                Brush="Blue"
                                Geometry="M 0 0 L 0 1, 0.1 1, 0.1 0.1, 1 0.1, 1 0 Z" />
                        </DrawingGroup>
                    </DrawingBrush.Drawing>
                </DrawingBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Rectangle>
            <Rectangle.Fill>
                <DrawingBrush
                    TileMode="Tile"
                    Viewport="0 0 1 1">
                    <DrawingBrush.Drawing>
                        <DrawingGroup>
                            <GeometryDrawing>
                                <GeometryDrawing.Geometry>
                                    <RectangleGeometry Rect="0 0 1 1" />
                                </GeometryDrawing.Geometry>
                                <GeometryDrawing.Brush>
                                    <LinearGradientBrush
                                        StartPoint="0.5 0"
                                        EndPoint="0.5 1">
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop Offset="0.0" Color="Blue"       />
                                            <GradientStop Offset="0.5" Color="#9966cc"    />
                                            <GradientStop Offset="1.0" Color="MediumBlue" />
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </GeometryDrawing.Brush>
                            </GeometryDrawing>
                            <GeometryDrawing>
                                <GeometryDrawing.Geometry>
                                    <RectangleGeometry Rect="0 0 1 1" />
                                </GeometryDrawing.Geometry>
                                <GeometryDrawing.Brush>
                                    <RadialGradientBrush GradientOrigin="0.75 0.25">
                                        <RadialGradientBrush.GradientStops>
                                            <GradientStop Offset="0.0" Color="White"       />
                                            <GradientStop Offset="0.5" Color="Transparent" />
                                            <GradientStop Offset="0.9" Color="Transparent" />
                                            <GradientStop Offset="1.0" Color="Yellow"      />
                                        </RadialGradientBrush.GradientStops>
                                    </RadialGradientBrush>
                                </GeometryDrawing.Brush>
                            </GeometryDrawing>
                        </DrawingGroup>
                    </DrawingBrush.Drawing>
                </DrawingBrush>
            </Rectangle.Fill>
        </Rectangle>
    </StackPanel>
</Page>
728x90
반응형
그리드형
Posted by 사용자 icodebroker
TAG , , , ,

댓글을 달아 주세요