30 lines
1.5 KiB
XML
30 lines
1.5 KiB
XML
<?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"
|
|
x:Class="Navigation_Between.View.MainPage"
|
|
x:Name="MainPage">
|
|
|
|
<ScrollView>
|
|
<VerticalStackLayout
|
|
Padding="30,0"
|
|
Spacing="25">
|
|
<CollectionView ItemsSource="{Binding Users}">
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate>
|
|
<Label Text="{Binding Name}" FontSize="Large">
|
|
<Label.GestureRecognizers>
|
|
<!--
|
|
Poprzednia wersja zapisu wyglądała następująco:
|
|
<TapGestureRecognizer Command="{Binding Source={RelativeSource AncestorType={x:Type local:MainViewModel}}, Path=SelectUserCommand}" CommandParameter="{Binding}" />
|
|
Ale ta zmiana wymaga dodania x:Name="MainPage" w ContentPage!
|
|
-->
|
|
<TapGestureRecognizer Command="{Binding Source={x:Reference MainPage}, Path=BindingContext.SelectUserCommand}" CommandParameter="{Binding}" />
|
|
</Label.GestureRecognizers>
|
|
</Label>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
</CollectionView>
|
|
</VerticalStackLayout>
|
|
</ScrollView>
|
|
</ContentPage>
|