Shapes
The System.Windows.Shapes
namespace defines drawing primitives that act as elements in the user
interface tree. WPF supports a variety of different shapes, and provides
element types for each of them, which are shown in Table 13-1. These integrate with framework-level
functionality such as layout, styling, and data binding. These services
are not without their costs, so it's useful to be aware that the shape
classes provide a layer of abstraction on top of a lower-level set of
services. See the "Shape Objects Versus Geometries"
sidebar for details.
Table 13-1. Shapes
Shape Type | Usage |
|---|---|
| An ellipse |
| A single straight line |
| A shape using any mixture of straight lines and curves |
| A closed shape made from straight lines |
| An open shape made from straight lines |
| A rectangle, optionally with rounded corners |