<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:d="http://xamarin.com/schemas/2014/forms/design"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d" Padding="0,20,0,0"
             x:Class="SyncfusionWebinar.Views.SimpleCollectionViewPage">
    <ContentPage.Content>
        <StackLayout>
            <CollectionView x:Name="ProductList" ItemsSource="{Binding Products}"
                            SelectionMode="Single" SelectionChanged="ProductList_SelectionChanged"
                            VerticalScrollBarVisibility="Never" HorizontalScrollBarVisibility="Never">

                <!--<CollectionView.ItemsLayout>
                    <LinearItemsLayout Orientation="Horizontal"/>
                </CollectionView.ItemsLayout>-->

                <!--<CollectionView.ItemsLayout>
                    <GridItemsLayout Orientation="Horizontal" Span="3"/>
                </CollectionView.ItemsLayout>-->
                
                <CollectionView.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="34"/>
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <Image Source="{Binding ProductImage}" HeightRequest="32" />
                            <StackLayout Grid.Column="1" Orientation="Vertical" Spacing="5">
                                <Label Text="{Binding ProductName}" FontSize="Large"
                TextColor="Blue"/>
                                <Label Text="{Binding ProductQuantity}" FontSize="Medium"
                TextColor="Black"/>
                            </StackLayout>
                        </Grid>
                    </DataTemplate>
                </CollectionView.ItemTemplate>
            </CollectionView>
        </StackLayout>
    </ContentPage.Content>
</ContentPage>