<UserControl x:Class="IHM.UCConnexion"
             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:local="clr-namespace:IHM"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800"
             Style="{StaticResource ImageFondRessource}">

    <DockPanel>
        <TextBlock Style="{StaticResource TitreDePage}" >Connexion</TextBlock>
        <TextBlock DockPanel.Dock="Top" HorizontalAlignment="Center" FontSize="15" Margin="20">Connectez vous à un compte déjà existant</TextBlock>

        <Button Click="Button_Click_Acceuil" Margin="20" DockPanel.Dock="Bottom" Style="{StaticResource GreenButtonRessource}">
            <TextBlock Text="Retour à la page d'acceuil"/>
        </Button>
        
        <Button DockPanel.Dock="Bottom" Click="Button_Click_Connection" Style="{StaticResource GreenButtonRessource}" Height="25" Width="150">
            <TextBlock Text="Se connecter" Style="{StaticResource TextBlockRessource}"/>
        </Button>

        <Button DockPanel.Dock="Bottom" Click="Button_Click_Forget_Password" Style="{StaticResource OrangeButtonRessource}" Height="25" Width="170" Margin="20">
            <TextBlock Text="Mot de passe oublié ?" Style="{StaticResource TextBlockRessource}"/>
        </Button>

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>

            
            <TextBlock Style="{StaticResource TextBlockRessource}" FontSize="15">Nom d'utilisateur</TextBlock>
            <StackPanel Grid.Column="1" Margin="30">
                <TextBlock x:Name="ErrorUserName" HorizontalAlignment="Center" FontSize="15" Foreground="#FF6347" Visibility="Hidden">Veuillez renseigner votre nom d'utilisateurs</TextBlock>
                <Border  Grid.Column="1" Style="{StaticResource BorderRessource}">
                    <TextBox x:Name="UserName">
                        <TextBox.Resources>
                            <Style TargetType="{x:Type Border}">
                                <Setter Property="CornerRadius" Value="5"/>
                            </Style>
                        </TextBox.Resources>
                    </TextBox>
                </Border>           
            </StackPanel>
            

            <TextBlock Grid.Row="1" Style="{StaticResource TextBlockRessource}" FontSize="15">Mot de passe</TextBlock>

            <StackPanel Grid.Row="1" Grid.Column="1">
                <TextBlock x:Name="ErrorPassword" HorizontalAlignment="Center" FontSize="15" Foreground="#FF6347" Visibility="Hidden">Veuillez renseigner votre mot de passe</TextBlock>
                <Border Style="{StaticResource BorderRessource}">
                    <PasswordBox x:Name="Password">
                        <PasswordBox.Resources>
                            <Style TargetType="{x:Type Border}">
                                <Setter Property="CornerRadius" Value="5"/>
                            </Style>
                        </PasswordBox.Resources>
                    </PasswordBox>
                </Border>
            </StackPanel>
           

        </Grid>
    </DockPanel>
</UserControl>