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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights 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
DOI: https://doi.org/10.1007/978-1-4302-4366-3_6
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-4365-6
Online ISBN: 978-1-4302-4366-3
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)