O'Reilly logo

Programming Windows®, Six Edition by Charles Petzold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Control Interaction

Early on in this book I made a distinction between classes that derive from FrameworkElement and those that derive from Control. I’ve tended to refer to FrameworkElement derivatives (such as TextBlock and Image) as “elements” to preserve this distinction, but a deeper explication is now required.

The title of this chapter might suggest that elements are for presentation and controls are for interaction, but that’s not necessarily so. It is the UIElement class that defines all the user-input events for touch, mouse, stylus, and keyboard, which means that elements as well as controls can interact with the user in very sophisticated ways.

Nor are elements deficient in layout, styling, or data binding capabilities. It’s ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required