Skip to content

Commit 969e1b9

Browse files
Fix template display issues with vertical stack layout
- Fix display of image - Fix number cut off for >=10
1 parent b246dda commit 969e1b9

File tree

1 file changed

+26
-32
lines changed

1 file changed

+26
-32
lines changed

GettingStartedMaui/GettingStartedMaui/MainPage.xaml

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,36 @@
44
BackgroundColor="{DynamicResource PageBackgroundColor}">
55

66
<ScrollView Padding="{OnPlatform iOS='30,60,30,30', Default='30'}">
7-
<StackLayout>
8-
<Grid RowSpacing="25" RowDefinitions="Auto,Auto,Auto,Auto,*">
9-
10-
<Label Text="Hello, World!"
11-
Grid.Row="0"
12-
SemanticProperties.HeadingLevel="Level1"
13-
FontSize="32"
14-
HorizontalOptions="CenterAndExpand" />
7+
<VerticalStackLayout Spacing="20">
158

16-
<Label Text="Welcome to .NET Multi-platform App UI"
17-
Grid.Row="1"
18-
SemanticProperties.Hint="Counts the number of times you click"
19-
FontSize="16"
20-
HorizontalOptions="CenterAndExpand" />
9+
<Label Text="Hello, World!"
10+
SemanticProperties.HeadingLevel="Level1"
11+
FontSize="32"
12+
HorizontalOptions="CenterAndExpand" />
2113

22-
<Label Text="Current count: 0"
23-
Grid.Row="2"
24-
SemanticProperties.Hint="Counts the number of times you click"
25-
FontSize="18"
26-
FontAttributes="Bold"
27-
x:Name="CounterLabel"
28-
HorizontalOptions="Center" />
14+
<Label Text="Welcome to .NET Multi-platform App UI"
15+
SemanticProperties.Hint="Counts the number of times you click"
16+
FontSize="16"
17+
HorizontalOptions="Center" />
2918

30-
<Button Text="Click me"
31-
Grid.Row="3"
32-
SemanticProperties.Hint="Counts the number of times you click"
33-
Clicked="OnCounterClicked"
34-
HorizontalOptions="Center" />
19+
<Label Text="Current count: 0"
20+
SemanticProperties.Hint="Counts the number of times you click"
21+
FontSize="18"
22+
FontAttributes="Bold"
23+
x:Name="CounterLabel"
24+
HorizontalOptions="Center" />
3525

36-
<Image Grid.Row="4"
37-
Source="dotnet_bot.png"
38-
SemanticProperties.Description="Cute dotnet bot waving hi to you!"
39-
WidthRequest="300"
40-
HorizontalOptions="Center" />
26+
<Button Text="Click me"
27+
SemanticProperties.Hint="Counts the number of times you click"
28+
Clicked="OnCounterClicked"
29+
HorizontalOptions="Center" />
4130

42-
</Grid>
43-
</StackLayout>
31+
<Image
32+
Source="dotnet_bot.png"
33+
SemanticProperties.Description="Cute dotnet bot waving hi to you!"
34+
WidthRequest="300"
35+
HorizontalOptions="Center" />
36+
37+
</VerticalStackLayout>
4438
</ScrollView>
4539
</ContentPage>

0 commit comments

Comments
 (0)