Shape
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Shapes.ShapeShape is the abstract base
class of graphical shape elements that can be added to the UI tree. The
derived types include Rectangle,
Ellipse, and Path. WPF defines two sets of classes for
working with graphical shapes: those derived from Shape and another set derived from Geometry. We describe both sets in Chapter 13. The distinction is that Shape-based elements derive from FrameworkElement and are therefore part of the
UI tree, and can use data binding, handle input, raise events, employ
styles, and participate in layout. Shape provides properties for controlling the
fill and outline of a shape, so if you want to define your own custom
shape types, you should derive from Shape to take advantage of these.