-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainPage.xaml
29 lines (27 loc) · 1.36 KB
/
MainPage.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
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:viewmodel="clr-namespace:SwipeView_Error.ViewModel"
x:Class="SwipeView_Error.MainPage">
<CollectionView x:Name="collectionView"
ItemsSource="{Binding Monkeys}">
<CollectionView.ItemTemplate>
<DataTemplate>
<SwipeView>
<SwipeView.LeftItems>
<SwipeItems>
<SwipeItem Text="Delete"
BackgroundColor="LightPink"
Command="{Binding Source={RelativeSource AncestorType={x:Type viewmodel:MonkeyViewModel}}, Path=DeleteCommand}"
CommandParameter="{Binding .}" />
</SwipeItems>
</SwipeView.LeftItems>
<VerticalStackLayout Padding="6,6">
<Label Text="{Binding Name}" />
<Label Text="{Binding Desc}" FontSize="10"/>
</VerticalStackLayout>
</SwipeView>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ContentPage>