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