Adding a button
When developing applications, you can use a set of predefined controls among which a button exists. It allows you to handle the event of pressing the button by a user. Of course, the appearance of the button can be easily adjusted, for instance, by choosing a proper background or border, as you will see in this recipe.
The button can present textual content. However, it can also be adjusted to the user's needs, for instance, by choosing a proper color or font size. This is not all, because the content shown on the button does not have to be only textual. For instance, you can prepare a button that presents an image instead of text, text over an image, or text located next to the small icon that visually informs about the operation. Such modifications are presented in the following part of this recipe as well.
Getting ready
To step through this recipe, you only need the automatically generated project.
How to do it...
To add a button to the page and handle the Click
event, perform...