<?xml version="1.0" encoding="UTF-8" ?>
<ContentView
    x:Class="iElection.Views.Controllers.PostItemTemplate"
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:forms="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms"
    xmlns:models="clr-namespace:iElection.Models;assembly=iElection"
    xmlns:videoPlayer="clr-namespace:Octane.Xamarin.Forms.VideoPlayer;assembly=Octane.Xamarin.Forms.VideoPlayer"
    xmlns:views="http://xamarin.com/schemas/2020/toolkit">
    <ContentView.Content>
        <StackLayout>
            <Frame
                Margin="10,5"
                Padding="0"
                CornerRadius="7">
                <StackLayout Margin="8">
                    <Grid>
                        <forms:CachedImage
                            Margin="-8"
                            Aspect="AspectFill"
                            Source="{Binding ImageUrl}" />
                        <Frame
                            x:Name="clipButton"
                            Padding="0"
                            BackgroundColor="{StaticResource Stylish}"
                            CornerRadius="25"
                            HorizontalOptions="End"
                            VerticalOptions="End">
                            <StackLayout Orientation="Horizontal">
                                <Label
                                    FontFamily="{StaticResource MaterialFontFamily}"
                                    FontSize="30"
                                    Text="{x:Static models:MaterialIconFont.PlayCircle}"
                                    TextColor="White" />
                                <Label
                                    Margin="15,0,0,5"
                                    HorizontalOptions="Center"
                                    Text="نمایش ویدیو"
                                    TextColor="White"
                                    VerticalOptions="Center" />
                            </StackLayout>
                            <Frame.GestureRecognizers>
                                <TapGestureRecognizer Tapped="PlayVideo_OnTapped" />
                            </Frame.GestureRecognizers>
                        </Frame>
                    </Grid>
                    <Label
                        Margin="0,8,0,0"
                        HorizontalOptions="Start"
                        Text="{Binding CreateAt}"
                        TextColor="#777" />
                    <Label
                        Margin="0,-8"
                        FontSize="Medium"
                        Text="{Binding Title}"
                        TextColor="#222" />
                    <Label
                        LineBreakMode="WordWrap"
                        Text="{Binding Description}"
                        TextColor="#222" />
                </StackLayout>
            </Frame>
        </StackLayout>
    </ContentView.Content>
</ContentView>