<UserControl x:Class="TwitterClient.TweetTemplate"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:c="clr-namespace:TwitterClient.Converters"
             mc:Ignorable="d" 
             d:DesignHeight="120" d:DesignWidth="375">
    <UserControl.Resources>
        <c:DateTimeToPeriodConverter x:Key="dateTimeToPeriodConverter"/>
    </UserControl.Resources>
    <Grid Height="118" Margin="4" >
            <Grid.RowDefinitions>
                <RowDefinition Height="5*" />
                <RowDefinition Height="19*" />
                <RowDefinition Height="69" />
                <RowDefinition Height="13" />
                <RowDefinition Height="12" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="76" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Rectangle MaxHeight="90" MaxWidth="90"  Grid.RowSpan="2"   RadiusX="4" RadiusY="4" Margin="5,7,5,12" Grid.Row="1">
                <Rectangle.Fill>
                    <ImageBrush ImageSource="{Binding Path=ProfileImage}" Stretch="Fill"  />
                </Rectangle.Fill>
            </Rectangle>
            <TextBlock Text="{Binding Path=ScreenName}" Grid.Column="1" FontSize="16" FontWeight="Bold"  FontFamily="Calibri" Foreground="#C4000000" Margin="0,0,12,0" Grid.Row="1" />
            <TextBlock Text="{Binding Path=Text}" Grid.Column="1" Grid.Row="2" FontSize="12"  FontFamily="Calibri" TextWrapping="Wrap" Margin="0,0,12,0" />
        <!--<TextBlock Text="{Binding StringFormat=Wysłany {0:MM-dd-yyyy hh:mm tt},  Path=PostDate}" Grid.Row="3" Grid.Column="1" FontFamily="Calibri" FontSize="9" Foreground="#A7000000" Margin="0,0,12,0"></TextBlock>-->
       <TextBlock Text="{Binding Path=PostDate,Converter={StaticResource dateTimeToPeriodConverter}}" Grid.Row="3" Grid.Column="1" FontFamily="Calibri" FontSize="9" Foreground="#A7000000" Margin="0,0,12,0"></TextBlock>
            <Grid.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFD9D9D9" Offset="0"/>
                    <GradientStop Color="White" Offset="1"/>
                </LinearGradientBrush>
            </Grid.Background>
        </Grid>
</UserControl>
