O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Ellipse

After discovering the flexibility of Rectangle and realizing that it can be made to look like an ellipse (or circle), you’d think that a separate Ellipse class would be redundant. And you’d be right! All Ellipse does is make it easier to get an elliptical shape. It defines no settable properties above and beyond what Shape and its base classes provide. Ellipse simply fills its rectangular region with the largest possible elliptical shape.

The following Ellipse could replace the last Rectangle in the previous XAML snippet, and Figure 7.1 would look identical:

<Ellipse Width="200" Height="100"  Fill="Orange" Stroke="Black" StrokeThickness="10" Margin="4"/>

The only change is replacing the element name and removing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required