<Window x:Class="ReAct_PME.ParametresFooocus"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:ReAct_PME"
        mc:Ignorable="d"
        Title="Parametres Fooocus" Height="400" Width="900" ResizeMode="NoResize" Background="#FFF0F0F0">
    <Grid Margin="10,10,10,10">
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="90"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <TextBlock Text="Negative Prompt :" Grid.Row="0" VerticalAlignment="Center"/>
        <TextBox Text="{Binding SelectedItem.negative_prompt, Mode=TwoWay}"  MaxLength="255"  Grid.Row="0" Margin="200,0,0,0"
                 ToolTip="Liste de ce que l’on veut éviter (qualité faible, flou...)"/>

        <TextBlock Text="Guidance Scale :" Grid.Row="1" VerticalAlignment="Center"/>
        <TextBox Text="{Binding SelectedItem.guidance_scale, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"  Grid.Row="1" Margin="200,0,0,0" MaxLength="4" 
                 ToolTip="L'influence du prompt (Guidance Scale) doit être comprise entre 1 et 30 - numérique à 1 décimale"/>

        <TextBlock Text="Performance Selection :" Grid.Row="2" VerticalAlignment="Center"/>
        <TextBox Text="{Binding SelectedItem.performance_selection, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"  Grid.Row="2" Margin="200,0,0,0" MaxLength="255" 
                 ToolTip="Le mode de performance doit être 'Speed', 'Quality' ou 'Extreme Speed'"/>

        <TextBlock Text="Sharpness :" Grid.Row="3" VerticalAlignment="Center"/>
        <TextBox Text="{Binding SelectedItem.sharpness, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"  Grid.Row="3" Margin="200,0,0,0" MaxLength="4" 
                 ToolTip="Le Sharpness (netteté appliquée à l’image finale) doit être compris entre 0 et 30. (Valeurs : 0.0 (douce) à 30.0 (très nette)) - numérique à 1 décimale"/>

        <TextBlock Text="Styles :" Grid.Row="4" VerticalAlignment="Center"/>
        <TextBox x:Name="TxtSeekStyle" Margin="200,0,485,0" Grid.Row="4"
                 TextChanged="TxtSeekStyle_TextChanged"
                 ToolTip="Saisir ici le début du style recherché"/> 
        <ComboBox x:Name="LstBoxStyles" Grid.Row="4"
                  ItemsSource="{Binding ListeStylesFooocusFiltered}"
                  IsEditable="False"
                  StaysOpenOnEdit="True"
                  Margin="400,0,100,0">
        </ComboBox>
        <Button Grid.Row="4" Width="80"
                Content="Ajouter" Margin="780,0,0,0"
                Style="{DynamicResource ButtonStyle}" 
                Click="ButtonAddStyle_Click" />
        
        <TextBlock Text="Styles retenus :" Grid.Row="5" VerticalAlignment="Center"/>
        <ListBox x:Name="LstBoxSelectedsStyles" Grid.Row="5"
                  ItemsSource="{Binding ListeSelectedsStylesFooocus}"
                  Margin="200,0,100,0">
        </ListBox>
        <Button Grid.Row="5" Width="80"
                Content="Enlever" Margin="780,0,0,0"
                Style="{DynamicResource ButtonStyle}" 
                Click="ButtonRemoveStyle_Click" />
        
        <TextBlock x:Name="Message" Text="..." Grid.Row="6" VerticalAlignment="Center"/>

        
        <StackPanel Orientation="Vertical" Grid.Row="7" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,0,0">
            <Button 
                Content="Sauvegarder" Width="80" Margin="5" 
                Style="{DynamicResource ButtonStyle}" 
                Click="Button_Click" />
            <Button Content="Fermer" Width="80" Margin="5" 
                Style="{DynamicResource ButtonStyle}" 
                Click="Button_Click_1"  />
        </StackPanel>
    </Grid>
</Window>
