<UserControl
    x:Class="PicView.WPF.Views.UserControls.Misc.QuickResize"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:buttons="clr-namespace:PicView.WPF.Views.UserControls.Buttons"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    d:DesignHeight="300"
    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" />

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

        <Label
            x:Name="ResizeImageLabel"
            Margin="0,0,0,115"
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            d:Content="ResizeImage" />

        <TextBlock
            x:Name="CropMessageTextBlock"
            Margin="0,0,0,67"
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            d:Text="CropMessage" />

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

            <DockPanel HorizontalAlignment="Center">

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

                <StackPanel Orientation="Horizontal">
                    <TextBlock
                        x:Name="HeightTextBlock"
                        Margin="10,0,10,0"
                        VerticalAlignment="Center"
                        d:Text="Height"
                        FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto Bold"
                        FontSize="14"
                        ToolTip="{Binding Text, RelativeSource={RelativeSource Self}}" />
                    <TextBox
                        x:Name="HeightBox"
                        Width="80"
                        d:Text="1080"
                        IsReadOnly="False" />
                </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"
                    Padding="9,9,9,9"
                    VerticalAlignment="Center"
                    d:Content="Apply"
                    Background="{DynamicResource BorderBrushAlt}">
                    <Label.Foreground>
                        <SolidColorBrush x:Name="ApplyBrush" Color="{StaticResource MainColor}" />
                    </Label.Foreground>
                </Label>
            </DockPanel>
        </Border>
    </Grid>
</UserControl>