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

■ Freeze 특성 : Freezable 엘리먼트의 IsFrozen 속성 상태를 true로 설정하기

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


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"

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

    Width="800"

    Height="600"

    Title="Freeze 특성 : Freezable 엘리먼트의 IsFrozen 속성 상태를 true로 설정하기"

    FontFamily="나눔고딕코딩"

    FontSize="16">

    <Grid>

        <Ellipse

            Width="300"

            Height="300"

            Stroke="Black"

            StrokeThickness="2">

            <Ellipse.Fill>

                <DrawingBrush

                    o:Freeze="True"

                    Viewport="0 0 10 10"

                    ViewportUnits="Absolute"

                    TileMode="Tile">

                    <DrawingBrush.Drawing>

                        <DrawingGroup>

                            <GeometryDrawing Brush="White">

                                <GeometryDrawing.Geometry>

                                    <RectangleGeometry Rect="0 0 100 100" />

                                </GeometryDrawing.Geometry>

                            </GeometryDrawing>

                            <GeometryDrawing Brush="LightGray">

                                <GeometryDrawing.Geometry>

                                    <GeometryGroup>

                                        <RectangleGeometry Rect="0 0 50 50"   />

                                        <RectangleGeometry Rect="50 50 50 50" />

                                    </GeometryGroup>

                                </GeometryDrawing.Geometry>

                            </GeometryDrawing>

                        </DrawingGroup>

                    </DrawingBrush.Drawing>

                </DrawingBrush>

            </Ellipse.Fill>

        </Ellipse>

    </Grid>

</Window>

 

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

Posted by 사용자 icodebroker
TAG , ,

댓글을 달아 주세요