<?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"
            xmlns:ffimageloading="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms"
             mc:Ignorable="d"
             x:Class="MobileApp.Views.SingleRestaurant">
    
    <ListView x:Name="SingleRestaurantView" HasUnevenRows="true">
        <ListView.ItemTemplate>
            <DataTemplate>
                <ViewCell>
                    <Frame Padding="0,0,0,0">
                        <Frame.Content>
                            <Frame>
                                <Frame.Content>
                                    <StackLayout Padding="0,0,0,0" Margin="10" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
                                        <Label x:Name ="Name" Text="{Binding Name}" FontSize="30" />
                                        <Label x:Name ="AddressHeading" Text="Address" Font="Bold" Padding="0,20,0,0"/>
                                        
                                        <Label x:Name ="StreetAddress" Text="{Binding StreetAddress}" />
                                        <Label x:Name="Postcode"  Text="{Binding Postcode}" Padding="0,0,0,10" />

                                        <BoxView HeightRequest="1" BackgroundColor="LightGray" HorizontalOptions="FillAndExpand" />
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*" />
                                                <ColumnDefinition Width="*" />
                                            </Grid.ColumnDefinitions>
                                            <Grid.RowDefinitions>
                                                <RowDefinition />
                                                <RowDefinition />
                                            </Grid.RowDefinitions>
                                            <Label x:Name="LatitudeHeading" Text="Latitude" Font="Bold" Grid.Column="0" Grid.Row="0" />
                                            <Label x:Name="LongtitudeHeading" Text="Longtitude" Font="Bold" Grid.Column="1" Grid.Row="0" />
                                            <Label x:Name="Latitude" Text="{Binding Latitude}" Grid.Column="0" Grid.Row="1" />
                                            <Label x:Name="Longtitude" Text="{Binding Longtitude}" Grid.Column="1" Grid.Row="1" />
                                        </Grid>
                                        
                                        <BoxView HeightRequest="1" BackgroundColor="LightGray" HorizontalOptions="FillAndExpand" /> 
                                       
                                        <Label x:Name="Description" Text="{Binding Description}"  Padding="0,20,0,30" />

                                        <ffimageloading:CachedImage HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"
			                                WidthRequest="1000"
                                            MinimumWidthRequest="1000"
                                            DownsampleToViewSize="True"
                                            DownsampleWidth="1000"
			                                Source = "{Binding fullURL}">
                                        </ffimageloading:CachedImage>
                                    </StackLayout>  
                                </Frame.Content>
                            </Frame>
                        </Frame.Content>
                    </Frame>
                </ViewCell>
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>
</ContentPage>