Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.

Commit 30546d4

Browse files
committed
Add ContentView to center content.
1 parent dfeff71 commit 30546d4

File tree

2 files changed

+32
-26
lines changed

2 files changed

+32
-26
lines changed

UserInterface/CarouselViewDemos/CarouselViewDemos/Views/EmptyView/EmptyViewWithViewsFilteredPage.xaml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,22 @@
1313
Placeholder="Filter" />
1414
<CarouselView ItemsSource="{Binding Monkeys}">
1515
<CarouselView.EmptyView>
16-
<StackLayout>
17-
<Label Text="No results matched your filter."
18-
Margin="10,25,10,10"
19-
FontAttributes="Bold"
20-
FontSize="18"
21-
HorizontalOptions="Fill"
22-
HorizontalTextAlignment="Center" />
23-
<Label Text="Try a broader filter?"
24-
FontAttributes="Italic"
25-
FontSize="12"
26-
HorizontalOptions="Fill"
27-
HorizontalTextAlignment="Center" />
28-
</StackLayout>
16+
<ContentView>
17+
<StackLayout HorizontalOptions="CenterAndExpand"
18+
VerticalOptions="CenterAndExpand">
19+
<Label Text="No results matched your filter."
20+
Margin="10,25,10,10"
21+
FontAttributes="Bold"
22+
FontSize="18"
23+
HorizontalOptions="Fill"
24+
HorizontalTextAlignment="Center" />
25+
<Label Text="Try a broader filter?"
26+
FontAttributes="Italic"
27+
FontSize="12"
28+
HorizontalOptions="Fill"
29+
HorizontalTextAlignment="Center" />
30+
</StackLayout>
31+
</ContentView>
2932
</CarouselView.EmptyView>
3033
<CarouselView.ItemTemplate>
3134
<DataTemplate>

UserInterface/CollectionViewDemos/CollectionViewDemos/Views/EmptyView/EmptyViewWithViewsFilteredPage.xaml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,22 @@
3737
</DataTemplate>
3838
</CollectionView.ItemTemplate>
3939
<CollectionView.EmptyView>
40-
<StackLayout>
41-
<Label Text="No results matched your filter."
42-
Margin="10,25,10,10"
43-
FontAttributes="Bold"
44-
FontSize="18"
45-
HorizontalOptions="Fill"
46-
HorizontalTextAlignment="Center" />
47-
<Label Text="Try a broader filter?"
48-
FontAttributes="Italic"
49-
FontSize="12"
50-
HorizontalOptions="Fill"
51-
HorizontalTextAlignment="Center" />
52-
</StackLayout>
40+
<ContentView>
41+
<StackLayout HorizontalOptions="CenterAndExpand"
42+
VerticalOptions="CenterAndExpand">
43+
<Label Text="No results matched your filter."
44+
Margin="10,25,10,10"
45+
FontAttributes="Bold"
46+
FontSize="18"
47+
HorizontalOptions="Fill"
48+
HorizontalTextAlignment="Center" />
49+
<Label Text="Try a broader filter?"
50+
FontAttributes="Italic"
51+
FontSize="12"
52+
HorizontalOptions="Fill"
53+
HorizontalTextAlignment="Center" />
54+
</StackLayout>
55+
</ContentView>
5356
</CollectionView.EmptyView>
5457
</CollectionView>
5558
</StackLayout>

0 commit comments

Comments
 (0)