I've tried to nest a CollectionView inside a ListView.... I was able to visualize all what i needed but now I cannot reach the click event on a single cell of a single CollectionView inside the list. This is my xaml code:
<ListView x:Name="MainListView" VerticalOptions="FillAndExpand">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<CollectionView Margin="10" SelectionMode="Single" ItemsSource="{Binding singleList}" FlowDirection="LeftToRight" ItemsLayout="HorizontalList">
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="10" Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Frame BackgroundColor="White" Grid.RowSpan="2" CornerRadius="5" Padding="10">
<Image Source="{Binding ImageName}" Aspect="AspectFill" HeightRequest="100" WidthRequest="100" />
</Frame>
<Label Grid.Column="1" Text="{Binding Name}" FontAttributes="Bold" />
<Label Grid.Row="1" Grid.Column="1" Text="{Binding Date}" VerticalOptions="End" />
<Image Grid.Row="2" Grid.Column="0" Source="shop" HeightRequest="20" WidthRequest="20" />
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
I suppose I have to use the SelectionChangedCommand event inside the Collection, but I don't understand... how!! Some help?