Graphics can generally be categorized as two-dimensional (2-D) and 3-D.
Shape and Geometry classes enable you to render 2-D objects. The Shape class acts as a base class for shape elements, such as Ellipse, Rectangle, Polygon, and Polyline. Its hierarchy is shown below in Figure 1.

Figure 1
As you can see, Shape derives from FrameworkElement which in turn derives from UIElement.
Shapes can be used inside Canvas, panels and most other controls.
Shape elements have many properties in common. A few of these properties are:
- Fill: Retrieves or specifies the Brush that specifies how to paint the interior of the shape.. The default is null.
- Height: Retrieves or specifies the height of the element.
- Stroke: Retrieves or specifies the outline of the shape. The default is null.
- StrokeThickness: Retrieves or specifies the width of the shape's outline.
- Width: Retrieves or specifies the width of the element.
- Opacity: Retrieves or specifies the transparency level for the Shape.



Join the conversation! Your thoughts help the community grow.