-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
RefreshScrollViewGallery.xaml
47 lines (45 loc) · 1.74 KB
/
RefreshScrollViewGallery.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"
x:Class="Xamarin.Forms.Controls.GalleryPages.RefreshViewGalleries.RefreshScrollViewGallery"
Title="ScrollView (Pull To Refresh)">
<ContentPage.Resources>
<ResourceDictionary>
<DataTemplate x:Key="RefreshItemTemplate">
<Grid
HeightRequest="120"
WidthRequest="120">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<BoxView
Grid.Row="0"
Color="{Binding Color}"/>
<Label
Grid.Row="1"
Text="{Binding Name}"/>
</Grid>
</DataTemplate>
</ResourceDictionary>
</ContentPage.Resources>
<ContentPage.Content>
<RefreshView
IsRefreshing="{Binding IsRefreshing}"
RefreshColor="Red"
Command="{Binding RefreshCommand}"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
<ScrollView>
<FlexLayout
Direction="Row"
Wrap="Wrap"
AlignItems="Stretch"
AlignContent="Start"
BindableLayout.ItemsSource="{Binding Items}"
BindableLayout.ItemTemplate="{StaticResource RefreshItemTemplate}"/>
</ScrollView>
</RefreshView>
</ContentPage.Content>
</ContentPage>