O'Reilly logo

Pro WPF in C# 2008: Windows Presentation Foundation with .NET 3.5, Second Edition by Matthew MacDonald

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

The Control Class

As you learned in Chapter 5, WPF windows are filled with elements, but only some of these elements are controls. Controls are user-interactive elements—elements that can take focus and receive input from the keyboard or mouse.

All controls derive from the System.Windows.Control class, which adds a bit of basic infrastructure:

  • The ability to set the alignment of content inside the control

  • The ability to set the tab order

  • Support for painting a background, foreground, and border

  • Support for formatting the size and font of text content

You've already learned about the first two points. (Chapter 5 covered content and alignment, while Chapter 6 explored the subtleties of focus and tab order.) The following sections cover brushes and ...

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