Skip to main content

Controls

  • Chapter
Pro WPF 4.5 in C#
  • 2571 Accesses

Abstract

Now that you’ve learned the fundamentals of layout, content, and event handling, you’re ready to take a closer look at WPF’s family of elements. In this chapter, you’ll consider controls—elements that derive from the System.Windows.Control class. You’ll begin by examining the base Control class, and learning how it supports brushes and fonts. Then you’ll explore the full catalog of WPF controls, including the following:

  • Content controls: These controls can contain nested elements, giving them nearly unlimited display capabilities. They include the Label, Button, ToolTip, and ScrollViewer classes.

  • Headered content controls: These are content controls that allow you to add a main section of content and a separate title portion. They are usually intended to wrap larger blocks of user interface. They include the TabItem, GroupBox, and Expander classes.

  • Text controls: This is the small set of controls that allow users to enter input. The text controls support ordinary text (the TextBox), passwords (the PasswordBox), and formatted text (the RichTextBox, which is discussed in Chapter 28).

  • List controls: These controls show collections of items in a list. They include the ListBox and ComboBox classes.

  • Range-based controls: These controls have just one thing in common: a Value property that can be set to any number in a prescribed range. Examples include the Slider and ProgressBar classes.

  • Date controls: This category includes two controls that allow users to select dates: the Calendar and DatePicker.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 79.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Matthew MacDonald

About this chapter

Cite this chapter

MacDonald, M. (2012). Controls. In: Pro WPF 4.5 in C#. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4366-3_6

Download citation

Publish with us

Policies and ethics