-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
RefreshCarouselViewGallery.xaml
47 lines (47 loc) · 2.15 KB
/
RefreshCarouselViewGallery.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
x:Class="Xamarin.Forms.Controls.GalleryPages.RefreshViewGalleries.RefreshCarouselViewGallery"
Title="CarouselView (Pull To Refresh)">
<ContentPage.Content>
<RefreshView
IsRefreshing="{Binding IsRefreshing}"
RefreshColor="Pink"
Command="{Binding RefreshCommand}"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
<CarouselView
ItemsSource="{Binding Items}">
<CarouselView.ItemsLayout>
<LinearItemsLayout
Orientation="Horizontal"
SnapPointsAlignment="Center"
SnapPointsType="MandatorySingle"/>
</CarouselView.ItemsLayout>
<CarouselView.ItemTemplate>
<DataTemplate>
<ScrollView>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<BoxView
Grid.Row="0"
Color="{Binding Color}"/>
<Label
Grid.Row="1"
Text="{Binding Name}"
VerticalOptions="Center"
HeightRequest="48"/>
</Grid>
</ScrollView>
</DataTemplate>
</CarouselView.ItemTemplate>
</CarouselView>
</RefreshView>
</ContentPage.Content>
</ContentPage>