From the course: Windows Presentation Foundation 5: Interaction and Controls

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Overview

Overview

- [Instructor] In this chapter, we'll explore the button classes. Buttons are those interactive controls that the user activates to signal their intention to start an action. Here are the base classes for the buttons. At the top is the control class. We studied this in other parts of this course, so I won't spend any time on that. Then below that is the content control. A content control is an element that can contain child content. That content can be a string, in which case the control shows text on the button, or it can be a nested set of XAML elements, then the button can contain complex arrangements of UI bits. Next is the button base and it's here where we start seeing some of the button specific members show up. I'll start by talking about the click event. The concept of clicking a button, which executes the code, has been part of Windows for a long time. In WPF, the click event provides a single location to determine when the user activates the button. Otherwise, we'd have to…

Contents