-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
RefreshLayoutGallery.xaml
48 lines (46 loc) · 1.84 KB
/
RefreshLayoutGallery.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
48
<?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.RefreshLayoutGallery"
Title="Layout (Pull To Refresh)">
<ContentPage.Resources>
<ResourceDictionary>
<DataTemplate x:Key="RefreshItemTemplate">
<Grid
HeightRequest="100"
WidthRequest="100">
<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">
<StackLayout
Padding="6">
<Label
FontSize="Medium"
FontAttributes="Bold"
Text="The Content of a RefreshView must be a scrollable control, such as ScrollView, CollectionView, ListView, etc."/>
<Label
FontSize="Small"
Text="Setting the Content to a control like Grid will result in undefined behavior."/>
</StackLayout>
</RefreshView>
</ContentPage.Content>
</ContentPage>