Skip to Main Content
Programming WPF, 2nd Edition
book

Programming WPF, 2nd Edition

by Chris Sells, Ian Griffiths
August 2007
Intermediate to advanced content levelIntermediate to advanced
864 pages
25h 52m
English
O'Reilly Media, Inc.
Content preview from Programming WPF, 2nd Edition

Shape

System.Object
    System.Windows.Threading.DispatcherObject
        System.Windows.DependencyObject
            System.Windows.Media.Visual
                System.Windows.UIElement
                    System.Windows.FrameworkElement
                        System.Windows.Shapes.Shape

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming C#, 4th Edition

Programming C#, 4th Edition

Jesse Liberty
Programming C# 10

Programming C# 10

Ian Griffiths

Publisher Resources

ISBN: 9780596510374Supplemental ContentErrata Page