<?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"
xmlns:local="clr-namespace:JustEat"
x:Class="JustEat.recepies"
Icon="list1.png"
>
<CollectionView SelectionMode="Single" x:Name="VIEW" ItemsSource="{Binding ResepiesItems}" HorizontalOptions="Center" Margin="10">
<CollectionView.ItemsLayout>
<GridItemsLayout Orientation="Vertical"
Span="2"
HorizontalItemSpacing="10"
VerticalItemSpacing="10"/>
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<Frame CornerRadius="15" BackgroundColor="Silver" Padding="0" IsClippedToBounds = "True" HasShadow="True" >
<Frame.GestureRecognizers>
<TapGestureRecognizer
Tapped="TapGestureRecognizer_Tapped"/>
</Frame.GestureRecognizers>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="270"/>
<RowDefinition Height="100"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<local:AspectRatioConteiner AspectRatio="1">
<Image Source="{Binding ImageSrc}"
Aspect="AspectFill"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
HeightRequest="120"
WidthRequest="120"
Margin="0,0,0,0"
BackgroundColor="Red"/>
</local:AspectRatioConteiner>
<Label Grid.Column="0"
Grid.Row="1"
Text="{Binding Name}"
FontAttributes="Bold"
HorizontalOptions="CenterAndExpand"
VerticalOptions="Start"
BackgroundColor="Green"/>
</Grid>
</Frame>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ContentPage>