Adding a reset button to our View Controller in the Storyboard

In this section, we will take a look at how we can use Buttons to respond to user actions when they are tapped on in the View Controller. Buttons contain numerous properties that can be set, as well as things called Control Events and Target/Action Events.

Control Events are executed and respond to actions whenever they are tapped. An example would be when you want to change the color of a button when it has been tapped or play some sound. On the other hand, Target/Action Events calls the underlying instance method to perform the action that is associated with that button where the code resides.

Let's start by adding a Button object to our View Controller, performing the following ...

Get Mastering Xamarin UI Development - Second Edition 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.