Exploring the layout options
Returning to MainPage.xaml
, the first thing we see below ContentPage
is a ScrollView
layout element. This is a layout that essentially says that anything contained in ScrollView
can (surprise!) scroll.
A layout contains other layouts and controls. It does this just as it’s done in XML, which is with opening and closing tags. Here is the syntax:
<ScrollView> // … layouts and controls </ScrollView>
A page can have only one element. Typically, that element is a layout, and since layouts can contain other layouts and controls, an entire hierarchy can be created.
The top four elements in MainPage.xaml
(out of the box) are as follows:
<ScrollView> [1] <VerticalStackLayout [2] Spacing="25" Padding="30,0" ...