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 15.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 ...

Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.