Apart from arranging controls vertically, it is possible to place them in a linear horizontal way, where a control is placed on the right-hand side of the previous one. This task can be accomplished using StackPanel
as well, as shown in this recipe.
To arrange controls horizontally, modify the content of the MainPage.xaml
file, as shown in the following code:
<Page (...)>
<StackPanel
Orientation="Horizontal"
Background="White"
Padding="20">
<TextBlock
Text="Grade:"
VerticalAlignment="Center" />
<Button Content="1" Margin="20 0 10 0" />
<Button Content="2" Margin="10 0" />
<Button Content="3" Margin...