Appendix D. User Interaction Controls
This appendix summarizes controls that are designed to let the user control the application. They let the user initiate and control actions.
Because these controls let the user control the program, they must have some way to interact with the program's executing code. That means they typically use event handlers written in code-behind, events in XAML code, or a mix of both.
The following sections very briefly summarize the WPF user interaction controls. They list the controls' most important properties and provide simple examples. For more detail, see Chapter 7.
Applications often use these controls to start some action and thus catch events raised by the controls. That makes these events more important than those raised by the controls described in previous appendixes.
This appendix focuses more on events than properties. It describes only properties that affect a control's behavior, not the simpler properties that determine the control's appearance.
IsEnabled property is particularly important to many of the controls described here. It determines whether the control will interact with the user. When
False, the control may change its appearance, but it definitely won't let the user interact with it.
Button lets the user initiate an action (see Table D-1).
Table D.1. Key Events for Button
Fires when the user clicks the
Button displays a simple text value, but if a
Button contains several other ...