-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
SwipeItemsDisposeGallery.xaml
55 lines (55 loc) · 2.29 KB
/
SwipeItemsDisposeGallery.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
49
50
51
52
53
54
55
<?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.SwipeViewGalleries.SwipeItemsDisposeGallery"
Title="Dispose SwipeItems Gallery">
<ContentPage.Content>
<Grid
RowSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid
Grid.Row="0"
BackgroundColor="Black">
<Label
TextColor="White"
Text="The SwipeItems msut disappear (dispose) closing the SwipeView."/>
</Grid>
<CollectionView
Grid.Row="1"
ItemsSource="{Binding Items}">
<CollectionView.ItemTemplate>
<DataTemplate>
<SwipeView>
<SwipeView.RightItems>
<SwipeItem
Text="Delete"
BackgroundColor="#2e2140" />
</SwipeView.RightItems>
<StackLayout
BackgroundColor="PaleGreen"
Opacity="0.5">
<StackLayout
Orientation="Horizontal">
<Label
Text="Swipe to Left"
FontSize="Subtitle"
LineBreakMode="WordWrap" />
</StackLayout>
<Label
Text="{Binding Title}"
FontSize="Micro" />
<Label
Text="{Binding SubTitle}"
FontSize="Micro" />
</StackLayout>
</SwipeView>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</Grid>
</ContentPage.Content>
</ContentPage>