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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.