Applying padding and margins to XAML layouts
In this section, we will take a look at how to apply and set Padding
and Margins
in each of your XAML Pages. The advantage of applying padding and setting margins in your XAML pages is that it allows you to customize the presentation of your control elements, so that those elements will display nicely in your user interface, based on the platform that your app is being run on.
Updating the WalksMainPage user interface using XAML
In this section, we will take a look at how to update the user interface for our WalksMainPage
to apply padding and set margins in your XAML, so that our control elements will display neatly in our user interface, based on the platform that is being run and using the OnPlatform
tag.
Let's start by updating the user interface for our WalksMainPage
by performing the following steps:
- Locate and open the
WalksMainPage.xaml
file, which is located in theViews
folder, ensure that it is displayed in the code editor, and enter the...