<UserControl
    x:Class="PicView.Views.UserControls.QuickResize"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:UserControls="clr-namespace:PicView.Views.UserControls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    d:DesignHeight="300"
    BorderBrush="{DynamicResource WindowBorderColorBrush}"
    BorderThickness="1"
    FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto"
    Foreground="{StaticResource MainColorBrush}"
    mc:Ignorable="d">

    <Grid x:Name="grid">

        <Border
            Width="{Binding ActualWidth, ElementName=grid}"
            Height="{Binding ActualHeight, ElementName=grid}"
            Background="{StaticResource BackgroundColorBrushFade}"
            BorderBrush="{StaticResource BorderBrush}"
            BorderThickness="1,0,1,0" />

        <UserControls:X2
            x:Name="x2"
            HorizontalAlignment="Right"
            VerticalAlignment="Top"
            Panel.ZIndex="1" />

        <Label
            Margin="0,0,0,115"
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            Content="{StaticResource ResizeImage}" />

        <TextBlock
            Margin="0,0,0,67"
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            Text="{StaticResource CropMessage}" />

        <Border
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            Background="{StaticResource NoisyBg}"
            BorderBrush="{StaticResource BorderBrush}"
            BorderThickness="1">

            <DockPanel HorizontalAlignment="Center">

                <StackPanel Orientation="Horizontal">
                    <TextBlock
                        Margin="10,0,10,0"
                        VerticalAlignment="Center"
                        FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto Bold"
                        FontSize="14"
                        Text="{StaticResource Width}"
                        ToolTip="{Binding Text, RelativeSource={RelativeSource Self}}" />
                    <TextBox
                        x:Name="WidthBox"
                        Width="55"
                        d:Text="1920"
                        IsReadOnly="False"
                        ToolTip="{StaticResource SizeTooltip}" />
                </StackPanel>

                <StackPanel Orientation="Horizontal">
                    <TextBlock
                        Margin="10,0,10,0"
                        VerticalAlignment="Center"
                        FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto Bold"
                        FontSize="14"
                        Text="{StaticResource Height}"
                        ToolTip="{Binding Text, RelativeSource={RelativeSource Self}}" />
                    <TextBox
                        x:Name="HeightBox"
                        Width="55"
                        d:Text="1080"
                        IsReadOnly="False"
                        ToolTip="{StaticResource SizeTooltip}" />
                </StackPanel>

                <Label
                    Margin="10,0,10,0"
                    VerticalAlignment="Center"
                    Content="⇔" />

                <ComboBox
                    x:Name="PercentageBox"
                    Width="80"
                    MinWidth="70"
                    KeyboardNavigation.DirectionalNavigation="Cycle">
                    <ComboBoxItem Content="100%" IsSelected="True" />
                    <ComboBoxItem Content="90%" />
                    <ComboBoxItem Content="80%" />
                    <ComboBoxItem Content="70%" />
                    <ComboBoxItem Content="60%" />
                    <ComboBoxItem Content="50%" />
                    <ComboBoxItem Content="40%" />
                    <ComboBoxItem Content="30%" />
                    <ComboBoxItem Content="20%" />
                    <ComboBoxItem Content="10%" />
                </ComboBox>

                <Label
                    x:Name="ApplyButton"
                    Margin="5,0,5,0"
                    VerticalAlignment="Center"
                    Background="{DynamicResource BorderBrushAlt}"
                    Content="{StaticResource Apply}">
                    <Label.Foreground>
                        <SolidColorBrush x:Name="ApplyBrush" Color="{DynamicResource ChosenColor}" />
                    </Label.Foreground>
                </Label>

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