<Application 
    x:Class="covoiturage.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone">

    <!--Application Resources-->
    <Application.Resources>

        <ControlTemplate x:Key="validationTemplate">
                    <TextBlock Foreground="Red" FontSize="20">!</TextBlock>
        </ControlTemplate>
        <Style x:Key="StyleMessageErreur" TargetType="TextBlock">
            <Setter Property="Foreground" Value="Red" />
            <Setter Property="FontSize" Value="25" />
            <Setter Property="FontFamily" Value="Comic Sans MS" />
            <Setter Property="HorizontalAlignment" Value="Center" />
        </Style>
        <DataTemplate x:Key="TemplateListeMesOffres" >
                <Border BorderBrush="{StaticResource PhoneAccentBrush}" BorderThickness="3" CornerRadius="12" Margin="2"  >
                    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="0,0,0,0">
                        <Grid Height="106" HorizontalAlignment="Left" Margin="12,0,0,0" Name="grid1" VerticalAlignment="Top" Width="433">
                            <TextBlock Height="43" HorizontalAlignment="Left" Margin="6,8,0,0" Name="txtJour" Text="{Binding jour}" VerticalAlignment="Top" Width="86" />
                            <TextBlock Height="30" HorizontalAlignment="Left" Margin="104,8,0,0" Name="txtDate" Text="{Binding date}" VerticalAlignment="Top" Width="119" />
                            <TextBlock Height="30" HorizontalAlignment="Left" Margin="229,8,0,0" Name="txtHeure" Text="{Binding heure}" VerticalAlignment="Top" Width="89" />
                            <TextBlock Height="54" HorizontalAlignment="Left" Margin="6,45,0,0" Name="txtLieu" Text="{Binding lieu}" VerticalAlignment="Top" Width="306" TextWrapping="Wrap" />
                            <Image Height="90" HorizontalAlignment="Left" Margin="310,6,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="60" Source="/covoiturage;component/images/poubelle.jpg" />
                        </Grid>
                    </Grid>
                </Border>
       </DataTemplate>
        <DataTemplate x:Key="templateRamassage">
            <TextBlock Text="{Binding}" Name="txtRamassage" />
        </DataTemplate>


        <DataTemplate x:Key="TemplateListeOffres" >
            <StackPanel Orientation="Horizontal" >
                <TextBlock Text="{Binding heure}" Height="80"  Width="130" FontSize="22" TextAlignment="Left" TextWrapping="Wrap"  />
                <TextBlock Text="{Binding date}" Height="80"  Width="130" FontSize="22" TextAlignment="Left" TextWrapping="Wrap"  />
                <TextBlock Text="{Binding lieu}" Height="80" Width="130" FontSize="22" TextAlignment="Left" TextWrapping="Wrap"/>
            </StackPanel>
        </DataTemplate>

    </Application.Resources>

    <Application.ApplicationLifetimeObjects>
        <!--Required object that handles lifetime events for the application-->
        <shell:PhoneApplicationService 
            Launching="Application_Launching" Closing="Application_Closing" 
            Activated="Application_Activated" Deactivated="Application_Deactivated"/>
    </Application.ApplicationLifetimeObjects>

</Application>