<Application x:Class="IHM.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:IHM"
             xmlns:conv="clr-namespace:IHM.Converters"
             StartupUri="MainWindow.xaml">
    <Application.Resources>

        <conv:Func2WindowPartConverter x:Key="Func2WpConv"/>

        <Style x:Key="BorderRessource" TargetType="Border">
            <Setter Property="BorderBrush" Value="#63A4FF"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Margin" Value="20"/>
            <Setter Property="CornerRadius" Value="5"/>
            <Setter Property="Height" Value="30"/>
            <Setter Property="Width" Value="175"/>
        </Style>

        <Style TargetType="UserControl" x:Key="ImageFondRessource">
            <Setter Property="Background">
                <Setter.Value>
                    <VisualBrush>
                        <VisualBrush.Visual>
                            <Image Source="./images/fond.jpg">
                               <Image.Effect>
                                    <BlurEffect Radius="0"/>
                                </Image.Effect>
                            </Image>
                        </VisualBrush.Visual>
                    </VisualBrush>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="TextBlockRessource" TargetType="TextBlock">
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
        </Style>

        <Style x:Key="TitreDePage" TargetType="TextBlock">
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="FontFamily" Value="Slab serif"/>
            <Setter Property="FontSize" Value="30"/>
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="DockPanel.Dock" Value="Top"/>
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="Margin" Value="20"/>

        </Style>

        <Style TargetType="Button" x:Key="TransparentButtonRessource">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="TextBlock.TextAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                        <Border CornerRadius="5" Background="Transparent" BorderBrush="#63A4FF" BorderThickness="1" >
                        <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        </Style>

        <Style x:Key="GreenButtonRessource" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border CornerRadius="5" BorderBrush="#63A4FF" BorderThickness="1" >
                            <Border.Background>
                                <LinearGradientBrush>
                                    <GradientStop Color="#80FF72" Offset="0"/>
                                    <GradientStop Color="#7EE8FA" Offset="1"/>
                                </LinearGradientBrush>
                            </Border.Background>
                            <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Padding" Value="10"/>
            <Setter Property="Margin" Value="60,0,0,0"/>
            <Setter Property="Height" Value="25"/>
            <Setter Property="Width" Value="150"/>
        </Style>




        <Style x:Key="OrangeButtonRessource" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border CornerRadius="5" BorderBrush="#63A4FF" BorderThickness="1" >
                            <Border.Background>
                                <LinearGradientBrush>
                                    <GradientStop Color="#FBD72B" Offset="0"/>
                                    <GradientStop Color="#F9484A" Offset="1"/>
                                </LinearGradientBrush>
                            </Border.Background>
                            <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
        </Style>

        <SolidColorBrush x:Key="CouleurPrincipale" Color="#23395d"/>

        <Style x:Key="BoutonMain" TargetType="Button">
            <Setter Property="Height" Value="40"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="Margin" Value="10,10,0,10" />

            <Setter Property="Background" Value="{StaticResource CouleurPrincipale}"/>
            <Setter Property="FontSize" Value="16"/>
            <Setter Property="Foreground" Value="White"/>



            <Style.Resources>
                
                <Style TargetType="Border">
                    <Setter Property="CornerRadius" Value="20,0,0,20"/>
                </Style>
            </Style.Resources>


            <Style.Triggers>

                

                <Trigger Property="IsDefault" Value="True">
                    <Setter Property="Foreground" Value="Black"/>
                    <Trigger.EnterActions>
                        <BeginStoryboard>
                            <Storyboard>
                                <ColorAnimation Duration="0:0:0.5" Storyboard.TargetProperty="(Button.Background).(SolidColorBrush.Color)" To="White"/>
                            </Storyboard>
                        </BeginStoryboard>
                    </Trigger.EnterActions>
                </Trigger>

                
                
                

            </Style.Triggers>
            
        </Style>





    </Application.Resources>
</Application>
