Button

Buttons are probably the most familiar and essential user interface elements. The Button control has already made several appearances in this book.

Although everyone intuitively knows what a button is, its precise definition (at least in XAML-based UI frameworks) might not be obvious. A button is a content control that can be clicked. Note that clicking is a logically distinct concept from tapping or other mouse events that are exposed on elements. Only classes deriving from ButtonBase have an event named Click.

So what’s special about Click? The Click event can not only be raised by a finger press, left mouse button click, or pen tap, but it can be raised from keyboard input as well. As has always been the case with Windows buttons, ...

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.