Button

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

Although everyone intuitively knows what a button is, its precise definition might not be obvious. A button is a content control that can be clicked. Note that this is a different concept from being tapped. All classes deriving from UIElement have a Tapped event, but only classes deriving from ButtonBase have a Click event.

So what’s the difference between Tapped and Click (besides past versus present tense, which is a historical artifact)? Tapped is raised only for a simple finger press, mouse button click, or pen tap, but Click can be raised from keyboard input as ...

Get Universal Windows® Apps with XAML and C# 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.