Silverlight

23.SilverLight3 - Geometry : EllipseGeometry

Godffs 2009. 11. 26. 11:11
반응형


MainPage.xaml

[그림 23-1]


<Grid x:Name="LayoutRoot" Background="White">

        <Path Fill="Yellow" Stroke="Red" StrokeThickness="5">

            <Path.Data>

                <EllipseGeometry Center="150,150" RadiusX="100" RadiusY="100">

                </EllipseGeometry>

            </Path.Data>

        </Path>

</Grid>



응용예제입니다.
FrmEllipseGeometry1.xaml

[그림 23-2]


<Grid x:Name="LayoutRoot" Background="White">

        <Rectangle Width="300" Height="300" Fill="Yellow"

            Stroke="Blue" StrokeThickness="3">

 

            <Rectangle.Clip>

                <!--Rectangle.Clip -->

                <EllipseGeometry RadiusX="100" RadiusY="100">

                </EllipseGeometry>

            </Rectangle.Clip>

 

        </Rectangle>

</Grid>




FrmEllipseGeometry2.xaml

[그림 23-3]


<Grid x:Name="LayoutRoot" Background="White">

        <Rectangle Width="300" Height="300" Fill="Yellow"

                   Stroke="Blue" StrokeThickness="3">

           

            <Rectangle.Clip>

                <EllipseGeometry Center="80, 80" RadiusX="100" RadiusY="100">

                </EllipseGeometry>

            </Rectangle.Clip>

           

        </Rectangle>

</Grid>



반응형