<Window
    x:Class="PicView.Views.Windows.ResizeWindow"
    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:uc="clr-namespace:PicView.Views.UserControls"
    Width="500"
    BorderBrush="{DynamicResource WindowBorderColorBrush}"
    BorderThickness="1"
    FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto"
    Foreground="{StaticResource MainColorBrush}"
    ResizeMode="CanMinimize"
    SizeToContent="Height"
    Style="{DynamicResource MyWindowStyle}"
    WindowStartupLocation="CenterOwner"
    mc:Ignorable="d">

    <Window.Resources>
        <Style TargetType="TextBlock">
            <Setter Property="FontFamily" Value="/PicView;component/Themes/Resources/fonts/#Roboto Medium" />
            <Setter Property="Width" Value="130" />
            <Setter Property="Margin" Value="15,0,0,0" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="TextTrimming" Value="CharacterEllipsis" />
            <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=Text}" />
        </Style>

    </Window.Resources>

    <DockPanel Background="{StaticResource NoisyBg}">
        <DockPanel
            x:Name="TitleBar"
            Height="30"
            Background="{StaticResource WindowBackgroundColorBrush}"
            DockPanel.Dock="Top">

            <uc:Icon />

            <uc:CloseButton
                x:Name="CloseButton"
                Width="30"
                Height="30"
                DockPanel.Dock="Right" />

            <uc:MinButton
                x:Name="MinButton"
                Width="30"
                Height="30"
                DockPanel.Dock="Right" />

            <TextBlock
                VerticalAlignment="Center"
                FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto Bold"
                FontSize="14"
                Text="{StaticResource BatchResize}"
                TextAlignment="Center" />
        </DockPanel>

        <Rectangle
            Height="1"
            DockPanel.Dock="Top"
            Fill="{StaticResource BorderBrush}" />

        <StackPanel Margin="0,0,0,15">

            <StackPanel Margin="0,10,0,5" Orientation="Horizontal">
                <TextBlock Text="Source folder" />
                <TextBox
                    Width="298"
                    FontSize="11"
                    IsReadOnly="False"
                    Text="B:\Pictures\new folder" />
                <uc:FolderButton x:Name="SourceFolderButton" />
            </StackPanel>

            <StackPanel Margin="0,0,0,10" Orientation="Horizontal">
                <TextBlock Text="Output folder" />
                <TextBox
                    Width="298"
                    FontSize="11"
                    IsReadOnly="False"
                    Text="B:\Pictures\another new folder" />
                <uc:FolderButton x:Name="OutputFolderButton" />
            </StackPanel>



            <StackPanel Margin="0,0,0,10" Orientation="Horizontal">
                <TextBlock Text="Convert to" />
                <ComboBox MinWidth="130">
                    <ComboBoxItem Content="No conversion" IsSelected="True" />
                    <ComboBoxItem Name="webp" Content=".webp" />
                    <ComboBoxItem Name="jpg" Content=".jpg" />
                    <ComboBoxItem Name="png" Content=".png" />
                </ComboBox>
            </StackPanel>



            <StackPanel Orientation="Horizontal">
                <StackPanel.Style>
                    <Style TargetType="StackPanel">
                        <Setter Property="Visibility" Value="Visible" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding ElementName=webp, Path=IsSelected}" Value="True">
                                <Setter Property="Visibility" Value="Collapsed" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </StackPanel.Style>
                <TextBlock Text="Compression" />
                <ComboBox MinWidth="130">
                    <ComboBoxItem Content="Lossless" IsSelected="True" />
                    <ComboBoxItem Content="Lossy" />
                    <ComboBoxItem Content="No compression" />
                </ComboBox>
            </StackPanel>

            <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
                <TextBlock Text="Quality" />
                <ComboBox
                    x:Name="QualityPercentage"
                    MinWidth="130"
                    KeyboardNavigation.DirectionalNavigation="Cycle">
                    <ComboBoxItem Content="100%" />
                    <ComboBoxItem Content="95%" />
                    <ComboBoxItem Content="90%" />
                    <ComboBoxItem Content="85%" />
                    <ComboBoxItem Content="80%" />
                    <ComboBoxItem Content="75%" IsSelected="True" />
                    <ComboBoxItem Content="70%" />
                    <ComboBoxItem Content="65%" />
                    <ComboBoxItem Content="60%" />
                    <ComboBoxItem Content="55%" />
                    <ComboBoxItem Content="50%" />
                    <ComboBoxItem Content="45%" />
                    <ComboBoxItem Content="40%" />
                    <ComboBoxItem Content="35%" />
                    <ComboBoxItem Content="30%" />
                </ComboBox>
            </StackPanel>

            <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
                <TextBlock Text="{StaticResource Resize}" />
                <ComboBox x:Name="ResizeComboBox" Width="130">
                    <ComboBoxItem
                        x:Name="NoResize"
                        Content="No Resize"
                        IsSelected="True" />
                    <ComboBoxItem x:Name="WidthResize" Content="{StaticResource Width}" />
                    <ComboBoxItem x:Name="HeightResize" Content="{StaticResource Height}" />
                    <ComboBoxItem x:Name="PercentageResize" Content="Percentage" />
                </ComboBox>
            </StackPanel>

            <StackPanel
                Margin="0,10,0,0"
                d:Visibility="Visible"
                Orientation="Horizontal">
                <StackPanel.Style>
                    <Style TargetType="StackPanel">
                        <Setter Property="Visibility" Value="Collapsed" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding ElementName=WidthResize, Path=IsSelected}" Value="True">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </StackPanel.Style>

                <TextBlock Text="{StaticResource Width}" />

                <TextBox
                    MinWidth="130"
                    IsReadOnly="False"
                    Text="100" />
            </StackPanel>

            <StackPanel
                Margin="0,10,0,0"
                d:Visibility="Visible"
                Orientation="Horizontal">
                <StackPanel.Style>
                    <Style TargetType="StackPanel">
                        <Setter Property="Visibility" Value="Collapsed" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding ElementName=HeightResize, Path=IsSelected}" Value="True">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </StackPanel.Style>

                <TextBlock Text="{StaticResource Height}" />

                <TextBox
                    MinWidth="130"
                    IsReadOnly="False"
                    Text="100" />
            </StackPanel>

            <StackPanel
                Margin="0,10,0,0"
                d:Visibility="Visible"
                Orientation="Horizontal">
                <StackPanel.Style>
                    <Style TargetType="StackPanel">
                        <Setter Property="Visibility" Value="Collapsed" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding ElementName=PercentageResize, Path=IsSelected}" Value="True">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </StackPanel.Style>

                <TextBlock Text="Percentage" />

                <TextBox
                    MinWidth="65"
                    IsReadOnly="False"
                    Text="90" />
                <Label
                    Margin="4,0,0,0"
                    VerticalAlignment="Center"
                    Content="%" />
            </StackPanel>

            <StackPanel Margin="0,10,0,5" Orientation="Horizontal">

                <TextBlock Text="Generate Thumbnails" />
                <ComboBox MinWidth="65">
                    <ComboBoxItem Content="0" />
                    <ComboBoxItem Content="1" />
                    <ComboBoxItem Content="2" />
                    <ComboBoxItem Content="3" IsSelected="True" />
                    <ComboBoxItem Content="4" />
                    <ComboBoxItem Content="5" />
                    <ComboBoxItem Content="6" />
                    <ComboBoxItem Content="7" />
                    <ComboBoxItem Content="8" />
                    <ComboBoxItem Content="9" />
                    <ComboBoxItem Content="10" />
                </ComboBox>
            </StackPanel>

            <StackPanel Margin="8,3,0,5" Orientation="Horizontal">
                <TextBlock Width="188">
                    <Run Text="Thumbnail" />
                    <Run Text=" 1 " />
                    <Run Text="output folder" />
                </TextBlock>
                <TextBox
                    Width="231"
                    FontSize="11"
                    IsReadOnly="False"
                    Text="B:\Pictures\another new folder\Large" />
                <uc:FolderButton x:Name="OutputFolderThumb1" />
            </StackPanel>

            <StackPanel Margin="17,3,0,6" Orientation="Horizontal">

                <TextBlock Width="179" Text="{StaticResource Resize}" />

                <StackPanel Orientation="Horizontal">

                    <ComboBox>
                        <ComboBoxItem Content="{StaticResource Width}" />
                        <ComboBoxItem Content="{StaticResource Height}" />
                        <ComboBoxItem Content="Percentage" IsSelected="True" />
                    </ComboBox>
                    <TextBox
                        Width="96"
                        Margin="15,0,0,0"
                        IsReadOnly="False"
                        Text="80" />
                </StackPanel>
            </StackPanel>


            <StackPanel Margin="8,3,0,5" Orientation="Horizontal">
                <TextBlock Width="188">
                    <Run Text="Thumbnail" />
                    <Run Text=" 2 " />
                    <Run Text="output folder" />
                </TextBlock>
                <TextBox
                    Width="231"
                    FontSize="11"
                    IsReadOnly="False"
                    Text="B:\Pictures\another new folder\Medium" />
                <uc:FolderButton x:Name="OutputFolderThumb2" />
            </StackPanel>

            <StackPanel Margin="17,3,0,6" Orientation="Horizontal">

                <TextBlock Width="179" Text="{StaticResource Resize}" />

                <StackPanel Orientation="Horizontal">

                    <ComboBox>
                        <ComboBoxItem Content="{StaticResource Width}" />
                        <ComboBoxItem Content="{StaticResource Height}" />
                        <ComboBoxItem Content="Percentage" IsSelected="True" />
                    </ComboBox>
                    <TextBox
                        Width="96"
                        Margin="15,0,0,0"
                        IsReadOnly="False"
                        Text="50" />
                </StackPanel>
            </StackPanel>



            <StackPanel Margin="8,3,0,5" Orientation="Horizontal">
                <TextBlock Width="188">
                    <Run Text="Thumbnail" />
                    <Run Text=" 3 " />
                    <Run Text="output folder" />
                </TextBlock>
                <TextBox
                    Width="231"
                    FontSize="11"
                    IsReadOnly="False"
                    Text="B:\Pictures\another new folder\Small" />
                <uc:FolderButton x:Name="OutputFolderThumb3" />
            </StackPanel>

            <StackPanel Margin="17,3,0,6" Orientation="Horizontal">

                <TextBlock Width="179" Text="{StaticResource Resize}" />

                <StackPanel Orientation="Horizontal">

                    <ComboBox>
                        <ComboBoxItem Content="{StaticResource Width}" />
                        <ComboBoxItem Content="{StaticResource Height}" />
                        <ComboBoxItem Content="Percentage" IsSelected="True" />
                    </ComboBox>
                    <TextBox
                        Width="96"
                        Margin="15,0,0,0"
                        IsReadOnly="False"
                        Text="30" />
                </StackPanel>
            </StackPanel>


            <TextBox
                Height="150"
                Margin="15,15,15,0"
                FontSize="11"
                Text="B:\Pictures\new folder.jpg 114.5 kb ==&gt; B:\Pictures\another new folder.webp 80.4 kb"
                ToolTip="{x:Null}" />

            <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
                <Button
                    Margin="0,10,5,0"
                    Content="Start"
                    Style="{StaticResource MetroFlatButton}" />
                <Button
                    Margin="10,10,0,0"
                    Content="Cancel"
                    Style="{StaticResource MetroFlatButton}" />
            </StackPanel>

        </StackPanel>

    </DockPanel>
</Window>
