In WPF, a Shape is an UIElement that enables you to draw a 2D shape in your application. There are a couple of ready-to-use shapes already provided by WPF, and they are as follows:
- Rectangle
- Ellipse
- Line
- Polyline
- Polygon
- Path
All of these UIElements expose some common properties to draw the shape. The Stroke and StrokeThickness properties describe the color and the thickness to draw the shape's outline. The Fill property describes the color used to decorate the interior of the shape.
In this recipe, we will learn how to create various shapes.