EllipseGeometry Class In SilverLight

In Vector Based Drawing, Silverlight uses Geometry and Shape objects that is useful for rendering different type of shapes, such as: ellipse, polygon, path, polyline, line and rectangle. These classes is helpful for us to render any type of images which we want to display.

Normally XAML displays any Image in Square Shape.

 <Canvas>

<Image

Source=”Image/One.jpg”

Width=”100” Height=”100”>

</Image>

</Canvas>

 

If we use EllipseGeometry Class, we can clip nay image into whatever the shape which we want:


<Canvas>

<Image

Source=”Image/One.jpg”

Width=”100” Height=”100”>

<Image.Clip>

<EllipseGeometry

RadiusX=”100”

RadiusY=”55”

Center=”100,55”/>

</Image.Clip>

</Image>

</Canvas>

 

Ebook Download
View all
Learn
View all