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

Control

System.Object
    System.Windows.Threading.DispatcherObject
        System.Windows.DependencyObject
            System.Windows.Media.Visual
                System.Windows.UIElement
                    System.Windows.FrameworkElement
                        System.Windows.Controls.Control

Control is the base class for elements that offer a particular interactive behavior. For example, a TextBox allows the user to enter and edit text; a ListBox presents a list of items, allowing the user to scroll through and select items.

Not all visual elements derive from Control. Elements with no intrinsic interactive behavior derive either directly from FrameworkElement or from one of the other noncontrol base classes described in this appendix.

Tip

Controls are typically visible to the user as a single coherent interactive entity in the user interface. Elements that do not fit this mold tend not to be controls. For example, the Grid type is extremely useful to developers as a means of managing layout, but it is not something directly recognizable to a user, so it is not a control. Likewise, although a Border element will be visible on-screen, it has no interactive behavior and no standard appearance. Normal users don't recognize Border elements in the way that they will recognize and understand a Button, so Border is also not a control (but Button is).

Control defines a Template property. This contains a reference to a ControlTemplate that defines the appearance of the control. Most controls are lookless—they have no intrinsic appearance and rely entirely on their templates ...

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