<UserControl
    x:Class="PicView.Avalonia.Views.Main.EffectsView"
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:customControls="clr-namespace:PicView.Avalonia.CustomControls"
    xmlns:uc="clr-namespace:PicView.Avalonia.Views.UC"
    xmlns:viewModels="clr-namespace:PicView.Avalonia.ViewModels"
    x:DataType="viewModels:MainViewModel">

    <UserControl.Styles>
        <Styles>
            <Style Selector="NumericUpDown">
                <Setter Property="Width" Value="64" />
                <Setter Property="FormatString" Value="N0" />
                <Setter Property="Foreground" Value="{DynamicResource MainTextColor}" />
            </Style>

            <Style Selector="TextBlock.sectionHeader">
                <Setter Property="FontFamily" Value="/Assets/Fonts/Roboto-Bold.ttf#Roboto" />
                <Setter Property="FontSize" Value="14" />
                <Setter Property="Foreground" Value="{StaticResource MainTextColor}" />
                <Setter Property="Margin" Value="0,12,0,8" />
                <Setter Property="Padding" Value="0" />
            </Style>

            <Style Selector="TextBlock.fieldLabel">
                <Setter Property="Foreground" Value="{StaticResource SecondaryTextColor}" />
                <Setter Property="VerticalAlignment" Value="Center" />
            </Style>

            <Style Selector="TabControl">
                <Setter Property="Margin" Value="10,10,10,0" />
            </Style>
        </Styles>


        <Style Selector="TabControl">
            <Setter Property="ItemsPanel">
                <ItemsPanelTemplate>
                    <UniformGrid Columns="{Binding $parent[TabControl].Items.Count}" />
                </ItemsPanelTemplate>
            </Setter>
        </Style>

        <Style Selector="TabControl TabItem">
            <Setter Property="Padding" Value="12,8" />
            <Setter Property="Margin" Value="0,0,10,0" />
            <Setter Property="Background" Value="Transparent" />
            <Setter Property="BorderBrush" Value="Transparent" />
            <Setter Property="BorderThickness" Value="0,0,0,2" />
            <Setter Property="CornerRadius" Value="2,2,0,0" />
            <Setter Property="Foreground" Value="{DynamicResource MainTextColor}" />
        </Style>


        <!--  Small reset button style (per-tab reset)  -->
        <Style Selector="Button.tabResetBtn">
            <Setter Property="HorizontalAlignment" Value="Right" />
            <Setter Property="Padding" Value="10,6" />
            <Setter Property="CornerRadius" Value="6" />
            <Setter Property="Background" Value="{DynamicResource MainButtonBackgroundColor}" />
            <Setter Property="BorderBrush" Value="{DynamicResource MainBorderColor}" />
            <Setter Property="BorderThickness" Value="1" />
        </Style>


    </UserControl.Styles>
    <UserControl.ContextMenu>
        <ContextMenu x:Name="EffectsContextMenu">
            <MenuItem Command="{CompiledBinding Tools.SaveFileCommand}" Header="{CompiledBinding Translation.Save.Value, Mode=OneWay}">
                <MenuItem.Icon>
                    <Path
                        Width="12"
                        Height="12"
                        Data="{StaticResource SaveGeometry}"
                        Fill="{DynamicResource MainTextColor}"
                        Stretch="Fill" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Command="{CompiledBinding Tools.SaveFileAsCommand}" Header="{CompiledBinding Translation.SaveAs.Value}">
                <MenuItem.Icon>
                    <Path
                        Width="12"
                        Height="12"
                        Data="{StaticResource SaveGeometry}"
                        Fill="{DynamicResource MainTextColor}"
                        Stretch="Fill" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Command="{CompiledBinding Tools.CopyImageCommand}" Header="{CompiledBinding Translation.CopyImage.Value, Mode=OneWay}">
                <MenuItem.Icon>
                    <Path
                        Width="12"
                        Height="12"
                        Data="{StaticResource CopyGeometry}"
                        Fill="{DynamicResource MainTextColor}"
                        Stretch="Fill" />
                </MenuItem.Icon>
            </MenuItem>
            <Separator />
            <MenuItem
                Command="{CompiledBinding Tools.SetAsWallpaperFilledCommand}"
                CommandParameter="{CompiledBinding PicViewer.FileInfo.CurrentValue.FullName,
                                                   FallbackValue=''}"
                Header="{CompiledBinding Translation.SetAsWallpaper.Value,
                                         Mode=OneWay}"
                IsVisible="{CompiledBinding GlobalSettings.ShowSetAsWallpaper.Value}">
                <MenuItem.Icon>
                    <Path
                        Width="13"
                        Height="10.40"
                        Data="{StaticResource PanoramaGeometry}"
                        Fill="{DynamicResource MainTextColor}"
                        Stretch="Fill" />
                </MenuItem.Icon>
            </MenuItem>
            <Separator IsVisible="{CompiledBinding GlobalSettings.ShowSetAsWallpaper.Value}" />
            <MenuItem x:Name="ClearEffectsItem" Header="{CompiledBinding Translation.ClearEffects.Value, Mode=OneWay}">
                <MenuItem.Icon>
                    <Image
                        Width="12"
                        Height="12"
                        Source="{StaticResource ClearImage}" />
                </MenuItem.Icon>
            </MenuItem>
            <Separator />
            <MenuItem x:Name="CloseItem" Header="{CompiledBinding Translation.Close.Value, Mode=OneWay}">
                <MenuItem.Icon>
                    <Path
                        Width="12"
                        Height="12"
                        Data="{StaticResource CloseGeometry}"
                        Fill="{DynamicResource MainTextColor}"
                        Stretch="Fill" />
                </MenuItem.Icon>
            </MenuItem>
        </ContextMenu>
    </UserControl.ContextMenu>

    <UserControl.Resources>
        <SolidColorBrush x:Key="CancelBrush" Color="{DynamicResource MainTextColor}" />

        <LinearGradientBrush x:Key="CB_CyanRed" StartPoint="0%,50%" EndPoint="100%,50%">
            <GradientStop Offset="0" Color="#4FC3F7" />
            <GradientStop Offset="0.5" Color="#E0E0E0" />
            <GradientStop Offset="1" Color="#E57373" />
        </LinearGradientBrush>

        <LinearGradientBrush x:Key="CB_MagentaGreen" StartPoint="0%,50%" EndPoint="100%,50%">
            <GradientStop Offset="0" Color="#CE93D8" />
            <GradientStop Offset="0.5" Color="#E0E0E0" />
            <GradientStop Offset="1" Color="#81C784" />
        </LinearGradientBrush>

        <LinearGradientBrush x:Key="CB_YellowBlue" StartPoint="0%,50%" EndPoint="100%,50%">
            <GradientStop Offset="0" Color="#FFF176" />
            <GradientStop Offset="0.5" Color="#E0E0E0" />
            <GradientStop Offset="1" Color="#64B5F6" />
        </LinearGradientBrush>

    </UserControl.Resources>

    <Panel>
        <uc:SpinWaiter
            x:Name="SpinWaiter"
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            IsVisible="{CompiledBinding MainWindow.IsLoadingIndicatorShown.Value,
                                        Mode=OneWay}" />

        <Border
            x:Name="ParentContainer"
            Width="550"
            Background="{DynamicResource MainBackgroundColor}">
            <DockPanel>

                <!--  Footer (always visible)  -->
                <StackPanel
                    x:Name="LowerPanel"
                    Height="80"
                    Background="#277A7A7A"
                    DockPanel.Dock="Bottom"
                    Orientation="Horizontal">

                    <Button
                        x:Name="ResetButton"
                        Width="195"
                        Margin="30,0,60,0"
                        Classes="BorderStyle altHover mainBtn"
                        CornerRadius="4"
                        IsVisible="False">
                        <TextBlock
                            Classes="txt"
                            Foreground="{StaticResource CancelBrush}"
                            Text="{CompiledBinding Translation.ClearEffects.Value,
                                                   Mode=OneWay}"
                            TextAlignment="Center" />
                    </Button>

                    <Button
                        x:Name="CancelButton"
                        Width="195"
                        Margin="30,0,60,0"
                        Classes="BorderStyle altHover mainBtn"
                        CornerRadius="4">
                        <TextBlock
                            Classes="txt"
                            Foreground="{StaticResource CancelBrush}"
                            Text="{CompiledBinding Translation.Cancel.Value,
                                                   Mode=OneWay}"
                            TextAlignment="Center" />
                    </Button>


                    <SplitButton
                        x:Name="SaveButton"
                        Width="195"
                        Background="{DynamicResource AccentColor}"
                        Classes="BorderStyle accentHover mainBtn"
                        Command="{CompiledBinding Tools.SaveFileCommand}"
                        CornerRadius="4">
                        <TextBlock
                            Classes="txt"
                            Foreground="{StaticResource SecondaryTextColor}"
                            Text="{CompiledBinding Translation.Save.Value,
                                                   Mode=OneWay}"
                            TextAlignment="Center" />
                        <SplitButton.Flyout>
                            <MenuFlyout FlyoutPresenterClasses="noCornerRadius" Placement="Bottom">
                                <MenuItem
                                    Width="195"
                                    HorizontalAlignment="Center"
                                    Command="{CompiledBinding Tools.SaveFileAsCommand}"
                                    Header="{CompiledBinding Translation.SaveAs.Value,
                                                             Mode=OneWay}" />
                            </MenuFlyout>
                        </SplitButton.Flyout>
                    </SplitButton>
                </StackPanel>

                <!--  Tabs  -->
                <TabControl x:Name="EffectsTabs">

                    <!--  COLOR TAB  -->
                    <TabItem Margin="0" Header="{Binding Translation.Color.Value}">
                        <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                            <StackPanel Margin="15,10">

                                <DockPanel Margin="0,0,-10,0" LastChildFill="True">
                                    <customControls:IconButton
                                        x:Name="ResetColorTabBtn"
                                        Width="30"
                                        Height="30"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        DockPanel.Dock="Right"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12"
                                        ToolTip.Tip="Reset Color" />

                                    <TextBlock
                                        Classes="txt sectionHeader"
                                        DockPanel.Dock="Left"
                                        Text="{Binding Translation.Color.Value}" />
                                </DockPanel>

                                <!--  Hue  -->
                                <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.Hue.Value}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="HueSlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        IsSnapToTickEnabled="False"
                                        LargeChange="10"
                                        Maximum="180"
                                        Minimum="-180"
                                        SmallChange="1"
                                        Theme="{StaticResource SetBg}"
                                        TickFrequency="1"
                                        Value="0">
                                        <customControls:CustomSlider.Background>
                                            <LinearGradientBrush StartPoint="0%,50%" EndPoint="100%,50%">
                                                <GradientStop Offset="0" Color="#FF0000" />
                                                <GradientStop Offset="0.17" Color="#FFFF00" />
                                                <GradientStop Offset="0.33" Color="#00FF00" />
                                                <GradientStop Offset="0.5" Color="#00FFFF" />
                                                <GradientStop Offset="0.67" Color="#0000FF" />
                                                <GradientStop Offset="0.83" Color="#FF00FF" />
                                                <GradientStop Offset="1" Color="#FF0000" />
                                            </LinearGradientBrush>
                                        </customControls:CustomSlider.Background>
                                    </customControls:CustomSlider>

                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=HueSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=HueSlider}"
                                        Value="{Binding Path=Value, ElementName=HueSlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetHueBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Saturation  -->
                                <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.Saturation.Value, Mode=OneWay}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="SaturationSlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        IsSnapToTickEnabled="False"
                                        LargeChange="10"
                                        Maximum="100"
                                        Minimum="-100"
                                        SmallChange="1"
                                        Theme="{StaticResource SetBg}"
                                        TickFrequency="1"
                                        Value="0">
                                        <customControls:CustomSlider.Background>
                                            <LinearGradientBrush StartPoint="0%,50%" EndPoint="100%,50%">
                                                <GradientStop Offset="0" Color="#808080" />
                                                <GradientStop Offset="0.6" Color="#D0D0D0" />
                                                <GradientStop Offset="1" Color="#F0F0F0" />
                                            </LinearGradientBrush>
                                        </customControls:CustomSlider.Background>
                                    </customControls:CustomSlider>

                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=SaturationSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=SaturationSlider}"
                                        Value="{Binding Path=Value, ElementName=SaturationSlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetSaturationBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Temperature  -->
                                <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.Temperature.Value}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="TemperatureSlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        IsSnapToTickEnabled="False"
                                        LargeChange="10"
                                        Maximum="100"
                                        Minimum="-100"
                                        SmallChange="1"
                                        Theme="{StaticResource SetBg}"
                                        TickFrequency="1"
                                        Value="0">
                                        <customControls:CustomSlider.Background>
                                            <LinearGradientBrush StartPoint="0%,50%" EndPoint="100%,50%">
                                                <GradientStop Offset="0" Color="#4D8CC9" />
                                                <GradientStop Offset="0.5" Color="#FFFFFF" />
                                                <GradientStop Offset="1" Color="#FFB36B" />
                                            </LinearGradientBrush>
                                        </customControls:CustomSlider.Background>
                                    </customControls:CustomSlider>

                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=TemperatureSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=TemperatureSlider}"
                                        Value="{Binding Path=Value, ElementName=TemperatureSlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetTemperatureBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Tint  -->
                                <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.Tint.Value}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="TintSlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        IsSnapToTickEnabled="False"
                                        LargeChange="10"
                                        Maximum="100"
                                        Minimum="-100"
                                        SmallChange="1"
                                        Theme="{StaticResource SetBg}"
                                        TickFrequency="1"
                                        Value="0">
                                        <customControls:CustomSlider.Background>
                                            <LinearGradientBrush StartPoint="0%,50%" EndPoint="100%,50%">
                                                <GradientStop Offset="0" Color="#55FF55" />
                                                <GradientStop Offset="0.5" Color="#FFFFFF" />
                                                <GradientStop Offset="1" Color="#FF66CC" />
                                            </LinearGradientBrush>
                                        </customControls:CustomSlider.Background>
                                    </customControls:CustomSlider>

                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=TintSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=TintSlider}"
                                        Value="{Binding Path=Value, ElementName=TintSlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetTintBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Vibrance  -->
                                <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.Tint.Value}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="VibranceSlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        IsSnapToTickEnabled="False"
                                        LargeChange="10"
                                        Maximum="100"
                                        Minimum="-100"
                                        SmallChange="1"
                                        Theme="{StaticResource SetBg}"
                                        TickFrequency="1"
                                        Value="0">
                                        <customControls:CustomSlider.Background>
                                            <LinearGradientBrush StartPoint="0%,50%" EndPoint="100%,50%">
                                                <GradientStop Offset="0" Color="#909090" />
                                                <GradientStop Offset="0.7" Color="#D8D8D8" />
                                                <GradientStop Offset="1" Color="#F2F2F2" />
                                            </LinearGradientBrush>
                                        </customControls:CustomSlider.Background>
                                    </customControls:CustomSlider>

                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=VibranceSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=VibranceSlider}"
                                        Value="{Binding Path=Value, ElementName=VibranceSlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetVibranceBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <Border
                                    Height="1"
                                    Margin="0,10,0,0"
                                    Background="{DynamicResource MainBorderColor}" />

                                <!--  Color Balance  -->
                                <TextBlock Classes="txt sectionHeader" Text="{Binding Translation.ColorBalance.Value, Mode=OneWay}" />

                                <TabControl x:Name="ColorBalanceTabs" Margin="0,6,0,0">

                                    <TabItem Margin="0" Header="{Binding Translation.Shadows.Value}">
                                        <StackPanel Margin="0,8,0,0">

                                            <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.Red.Value}" />
                                            <StackPanel Orientation="Horizontal">
                                                <customControls:CustomSlider
                                                    x:Name="CBShadowsCR"
                                                    Width="400"
                                                    Height="30"
                                                    Background="{StaticResource CB_CyanRed}"
                                                    Maximum="100"
                                                    Minimum="-100"
                                                    Theme="{StaticResource SetBg}"
                                                    Value="0" />
                                                <NumericUpDown
                                                    Maximum="{Binding Path=Maximum, ElementName=CBShadowsCR}"
                                                    Minimum="{Binding Path=Minimum, ElementName=CBShadowsCR}"
                                                    Value="{Binding Path=Value, ElementName=CBShadowsCR}" />
                                            </StackPanel>

                                            <TextBlock
                                                Margin="0,8,0,0"
                                                Classes="txt fieldLabel"
                                                Text="{Binding Translation.Green.Value}" />
                                            <StackPanel Orientation="Horizontal">
                                                <customControls:CustomSlider
                                                    x:Name="CBShadowsMG"
                                                    Width="400"
                                                    Height="30"
                                                    Background="{StaticResource CB_MagentaGreen}"
                                                    Maximum="100"
                                                    Minimum="-100"
                                                    Theme="{StaticResource SetBg}"
                                                    Value="0" />

                                                <NumericUpDown
                                                    Maximum="{Binding Path=Maximum, ElementName=CBShadowsMG}"
                                                    Minimum="{Binding Path=Minimum, ElementName=CBShadowsMG}"
                                                    Value="{Binding Path=Value, ElementName=CBShadowsMG}" />
                                            </StackPanel>

                                            <TextBlock
                                                Margin="0,8,0,0"
                                                Classes="txt fieldLabel"
                                                Text="{Binding Translation.Blue.Value}" />
                                            <StackPanel Orientation="Horizontal">
                                                <customControls:CustomSlider
                                                    x:Name="CBShadowsYB"
                                                    Width="400"
                                                    Height="30"
                                                    Background="{StaticResource CB_YellowBlue}"
                                                    Maximum="100"
                                                    Minimum="-100"
                                                    Theme="{StaticResource SetBg}"
                                                    Value="0" />
                                                <NumericUpDown
                                                    Maximum="{Binding Path=Maximum, ElementName=CBShadowsYB}"
                                                    Minimum="{Binding Path=Minimum, ElementName=CBShadowsYB}"
                                                    Value="{Binding Path=Value, ElementName=CBShadowsYB}" />
                                            </StackPanel>

                                        </StackPanel>
                                    </TabItem>

                                    <TabItem Margin="0" Header="{Binding Translation.Midtones.Value}">
                                        <StackPanel Margin="0,8,0,0">

                                            <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.Red.Value}" />
                                            <StackPanel Orientation="Horizontal">
                                                <customControls:CustomSlider
                                                    x:Name="CBMidCR"
                                                    Width="400"
                                                    Height="30"
                                                    Background="{StaticResource CB_CyanRed}"
                                                    Maximum="100"
                                                    Minimum="-100"
                                                    Theme="{StaticResource SetBg}"
                                                    Value="0" />
                                                <NumericUpDown
                                                    Maximum="{Binding Path=Maximum, ElementName=CBMidCR}"
                                                    Minimum="{Binding Path=Minimum, ElementName=CBMidCR}"
                                                    Value="{Binding Path=Value, ElementName=CBMidCR}" />
                                            </StackPanel>

                                            <TextBlock
                                                Margin="0,8,0,0"
                                                Classes="txt fieldLabel"
                                                Text="{Binding Translation.Green.Value}" />
                                            <StackPanel Orientation="Horizontal">
                                                <customControls:CustomSlider
                                                    x:Name="CBMidMG"
                                                    Width="400"
                                                    Height="30"
                                                    Background="{StaticResource CB_MagentaGreen}"
                                                    Maximum="100"
                                                    Minimum="-100"
                                                    Theme="{StaticResource SetBg}"
                                                    Value="0" />
                                                <NumericUpDown
                                                    Maximum="{Binding Path=Maximum, ElementName=CBMidMG}"
                                                    Minimum="{Binding Path=Minimum, ElementName=CBMidMG}"
                                                    Value="{Binding Path=Value, ElementName=CBMidMG}" />
                                            </StackPanel>

                                            <TextBlock
                                                Margin="0,8,0,0"
                                                Classes="txt fieldLabel"
                                                Text="{Binding Translation.Blue.Value}" />
                                            <StackPanel Orientation="Horizontal">
                                                <customControls:CustomSlider
                                                    x:Name="CBMidYB"
                                                    Width="400"
                                                    Height="30"
                                                    Background="{StaticResource CB_YellowBlue}"
                                                    Maximum="100"
                                                    Minimum="-100"
                                                    Theme="{StaticResource SetBg}"
                                                    Value="0" />
                                                <NumericUpDown
                                                    Maximum="{Binding Path=Maximum, ElementName=CBMidYB}"
                                                    Minimum="{Binding Path=Minimum, ElementName=CBMidYB}"
                                                    Value="{Binding Path=Value, ElementName=CBMidYB}" />
                                            </StackPanel>

                                        </StackPanel>
                                    </TabItem>

                                    <TabItem Margin="0" Header="{Binding Translation.Highlights.Value}">
                                        <StackPanel Margin="0,8,0,0">

                                            <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.Red.Value}" />
                                            <StackPanel Orientation="Horizontal">
                                                <customControls:CustomSlider
                                                    x:Name="CBHighCR"
                                                    Width="400"
                                                    Height="30"
                                                    Background="{StaticResource CB_CyanRed}"
                                                    Maximum="100"
                                                    Minimum="-100"
                                                    Theme="{StaticResource SetBg}"
                                                    Value="0" />
                                                <NumericUpDown
                                                    Maximum="{Binding Path=Maximum, ElementName=CBHighCR}"
                                                    Minimum="{Binding Path=Minimum, ElementName=CBHighCR}"
                                                    Value="{Binding Path=Value, ElementName=CBHighCR}" />
                                            </StackPanel>

                                            <TextBlock
                                                Margin="0,8,0,0"
                                                Classes="txt fieldLabel"
                                                Text="{Binding Translation.Green.Value}" />
                                            <StackPanel Orientation="Horizontal">
                                                <customControls:CustomSlider
                                                    x:Name="CBHighMG"
                                                    Width="400"
                                                    Height="30"
                                                    Background="{StaticResource CB_MagentaGreen}"
                                                    Maximum="100"
                                                    Minimum="-100"
                                                    Theme="{StaticResource SetBg}"
                                                    Value="0" />
                                                <NumericUpDown
                                                    Maximum="{Binding Path=Maximum, ElementName=CBHighMG}"
                                                    Minimum="{Binding Path=Minimum, ElementName=CBHighMG}"
                                                    Value="{Binding Path=Value, ElementName=CBHighMG}" />
                                            </StackPanel>

                                            <TextBlock
                                                Margin="0,8,0,0"
                                                Classes="txt fieldLabel"
                                                Text="{Binding Translation.Blue.Value}" />
                                            <StackPanel Orientation="Horizontal">
                                                <customControls:CustomSlider
                                                    x:Name="CBHighYB"
                                                    Width="400"
                                                    Height="30"
                                                    Background="{StaticResource CB_YellowBlue}"
                                                    Maximum="100"
                                                    Minimum="-100"
                                                    Theme="{StaticResource SetBg}"
                                                    Value="0" />
                                                <NumericUpDown
                                                    Maximum="{Binding Path=Maximum, ElementName=CBHighYB}"
                                                    Minimum="{Binding Path=Minimum, ElementName=CBHighYB}"
                                                    Value="{Binding Path=Value, ElementName=CBHighYB}" />
                                            </StackPanel>

                                        </StackPanel>
                                    </TabItem>

                                </TabControl>


                            </StackPanel>
                        </ScrollViewer>
                    </TabItem>

                    <!--  LIGHTING TAB  -->
                    <TabItem Margin="0" Header="{Binding Translation.Lighting.Value}">
                        <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                            <StackPanel Margin="15,10">

                                <DockPanel Margin="0,0,-10,0" LastChildFill="True">
                                    <customControls:IconButton
                                        x:Name="ResetLightingTabBtn"
                                        Width="30"
                                        Height="30"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        DockPanel.Dock="Right"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12"
                                        ToolTip.Tip="Reset Lighting" />

                                    <TextBlock
                                        Classes="txt sectionHeader"
                                        DockPanel.Dock="Left"
                                        Text="{CompiledBinding Translation.Lighting.Value,
                                                               Mode=OneWay}" />
                                </DockPanel>

                                <!--  Exposure  -->
                                <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.ExposureBias.Value}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="ExposureSlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        IsSnapToTickEnabled="False"
                                        LargeChange="0.25"
                                        Maximum="2"
                                        Minimum="-2"
                                        SmallChange="0.05"
                                        Theme="{StaticResource SetBg}"
                                        TickFrequency="0.05"
                                        Value="0">
                                        <customControls:CustomSlider.Background>
                                            <LinearGradientBrush StartPoint="0%,50%" EndPoint="100%,50%">
                                                <GradientStop Offset="0" Color="#101010" />
                                                <GradientStop Offset="0.5" Color="#808080" />
                                                <GradientStop Offset="1" Color="#FFFFFF" />
                                            </LinearGradientBrush>
                                        </customControls:CustomSlider.Background>
                                    </customControls:CustomSlider>

                                    <NumericUpDown
                                        Increment="0.05"
                                        Maximum="{Binding Path=Maximum, ElementName=ExposureSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=ExposureSlider}"
                                        Value="{Binding Path=Value, ElementName=ExposureSlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetExposureBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Brightness  -->
                                <TextBlock Classes="txt fieldLabel" Text="{CompiledBinding Translation.Brightness.Value, Mode=OneWay}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="BrightnessSlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        IsSnapToTickEnabled="False"
                                        LargeChange="10"
                                        Maximum="100"
                                        Minimum="-100"
                                        SmallChange="1"
                                        Theme="{StaticResource SetBg}"
                                        TickFrequency="1"
                                        Value="0">
                                        <customControls:CustomSlider.Background>
                                            <LinearGradientBrush StartPoint="0%,50%" EndPoint="100%,50%">
                                                <GradientStop Offset="0" Color="#111111" />
                                                <GradientStop Offset="1" Color="#FFFFFF" />
                                            </LinearGradientBrush>
                                        </customControls:CustomSlider.Background>
                                    </customControls:CustomSlider>

                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=BrightnessSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=BrightnessSlider}"
                                        Value="{Binding Path=Value, ElementName=BrightnessSlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetBrightnessBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Contrast  -->
                                <TextBlock Classes="txt fieldLabel" Text="{CompiledBinding Translation.Contrast.Value, Mode=OneWay}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="ContrastSlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        IsSnapToTickEnabled="False"
                                        LargeChange="10"
                                        Maximum="100"
                                        Minimum="-100"
                                        SmallChange="1"
                                        Theme="{StaticResource SetBg}"
                                        TickFrequency="1"
                                        Value="0">
                                        <customControls:CustomSlider.Background>
                                            <LinearGradientBrush StartPoint="0%,50%" EndPoint="100%,50%">
                                                <GradientStop Offset="0" Color="#000000" />
                                                <GradientStop Offset="0.5" Color="#808080" />
                                                <GradientStop Offset="1" Color="#FFFFFF" />
                                            </LinearGradientBrush>
                                        </customControls:CustomSlider.Background>
                                    </customControls:CustomSlider>

                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=ContrastSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=ContrastSlider}"
                                        Value="{Binding Path=Value, ElementName=ContrastSlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetContrastBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Gamma  -->
                                <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.Gamma.Value}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="GammaSlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        IsSnapToTickEnabled="False"
                                        LargeChange="0.1"
                                        Maximum="3"
                                        Minimum="0.3"
                                        SmallChange="0.01"
                                        Theme="{StaticResource SetBg}"
                                        TickFrequency="0.01"
                                        Value="1">
                                        <customControls:CustomSlider.Background>
                                            <LinearGradientBrush StartPoint="0%,50%" EndPoint="100%,50%">
                                                <GradientStop Offset="0" Color="#1A1A1A" />
                                                <GradientStop Offset="0.5" Color="#A0A0A0" />
                                                <GradientStop Offset="1" Color="#F5F5F5" />
                                            </LinearGradientBrush>
                                        </customControls:CustomSlider.Background>
                                    </customControls:CustomSlider>

                                    <NumericUpDown
                                        Increment="0.01"
                                        Maximum="{Binding Path=Maximum, ElementName=GammaSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=GammaSlider}"
                                        Value="{Binding Path=Value, ElementName=GammaSlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetGammaBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <TextBlock Classes="txt sectionHeader" Text="{Binding Translation.Tonal.Value}" />

                                <!--  Highlights  -->
                                <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.Highlights.Value}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="HighlightsSlider"
                                        Width="400"
                                        Height="30"
                                        Maximum="100"
                                        Minimum="-100"
                                        Theme="{StaticResource SetBg}"
                                        Value="0">
                                        <customControls:CustomSlider.Background>
                                            <LinearGradientBrush StartPoint="0%,50%" EndPoint="100%,50%">
                                                <GradientStop Offset="0" Color="#C0C0C0" />
                                                <GradientStop Offset="1" Color="#FFFFFF" />
                                            </LinearGradientBrush>
                                        </customControls:CustomSlider.Background>
                                    </customControls:CustomSlider>
                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=HighlightsSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=HighlightsSlider}"
                                        Value="{Binding Path=Value, ElementName=HighlightsSlider}" />
                                    <customControls:IconButton
                                        x:Name="ResetHighlightsBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Shadows  -->
                                <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.Shadows.Value}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="ShadowsSlider"
                                        Width="400"
                                        Height="30"
                                        Maximum="100"
                                        Minimum="-100"
                                        Theme="{StaticResource SetBg}"
                                        Value="0">
                                        <customControls:CustomSlider.Background>
                                            <LinearGradientBrush StartPoint="0%,50%" EndPoint="100%,50%">
                                                <GradientStop Offset="0" Color="#000000" />
                                                <GradientStop Offset="1" Color="#808080" />
                                            </LinearGradientBrush>
                                        </customControls:CustomSlider.Background>
                                    </customControls:CustomSlider>
                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=ShadowsSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=ShadowsSlider}"
                                        Value="{Binding Path=Value, ElementName=ShadowsSlider}" />
                                    <customControls:IconButton
                                        x:Name="ResetShadowsBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Blacks / Whites  -->
                                <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.Blacks.Value}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="BlacksSlider"
                                        Width="400"
                                        Height="30"
                                        Maximum="50"
                                        Minimum="-50"
                                        Theme="{StaticResource SetBg}"
                                        Value="0">
                                        <customControls:CustomSlider.Background>
                                            <LinearGradientBrush StartPoint="0%,50%" EndPoint="100%,50%">
                                                <GradientStop Offset="0" Color="#000000" />
                                                <GradientStop Offset="0.5" Color="#404040" />
                                                <GradientStop Offset="1" Color="#808080" />
                                            </LinearGradientBrush>
                                        </customControls:CustomSlider.Background>
                                    </customControls:CustomSlider>
                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=BlacksSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=BlacksSlider}"
                                        Value="{Binding Path=Value, ElementName=BlacksSlider}" />
                                    <customControls:IconButton
                                        x:Name="ResetBlacksBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.Whites.Value}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="WhitesSlider"
                                        Width="400"
                                        Height="30"
                                        Maximum="50"
                                        Minimum="-50"
                                        Theme="{StaticResource SetBg}"
                                        Value="0">
                                        <customControls:CustomSlider.Background>
                                            <LinearGradientBrush StartPoint="0%,50%" EndPoint="100%,50%">
                                                <GradientStop Offset="0" Color="#D0D0D0" />
                                                <GradientStop Offset="1" Color="#FFFFFF" />
                                            </LinearGradientBrush>
                                        </customControls:CustomSlider.Background>
                                    </customControls:CustomSlider>
                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=WhitesSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=WhitesSlider}"
                                        Value="{Binding Path=Value, ElementName=WhitesSlider}" />
                                    <customControls:IconButton
                                        x:Name="ResetWhitesBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                            </StackPanel>
                        </ScrollViewer>
                    </TabItem>

                    <!--  EFFECTS TAB  -->
                    <TabItem Margin="0" Header="{Binding Translation.Effects.Value}">
                        <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                            <StackPanel Margin="15,10">

                                <DockPanel Margin="0,0,-10,0" LastChildFill="True">
                                    <customControls:IconButton
                                        x:Name="ResetEffectsTabBtn"
                                        Width="30"
                                        Height="30"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        DockPanel.Dock="Right"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12"
                                        ToolTip.Tip="{Binding Translation.ResetButtonText.Value}" />

                                    <TextBlock
                                        Classes="txt sectionHeader"
                                        DockPanel.Dock="Left"
                                        Text="{CompiledBinding Translation.Effects.Value,
                                                               Mode=OneWay}" />
                                </DockPanel>

                                <!--  Dehaze  -->
                                <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.Dehaze.Value}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="DehazeSlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        Maximum="100"
                                        Minimum="0"
                                        Value="0" />

                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=DehazeSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=DehazeSlider}"
                                        Value="{Binding Path=Value, ElementName=DehazeSlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetDehazeBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Clarity  -->
                                <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.Clarity.Value}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="ClaritySlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        Maximum="100"
                                        Minimum="0"
                                        Value="0" />

                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=ClaritySlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=ClaritySlider}"
                                        Value="{Binding Path=Value, ElementName=ClaritySlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetClarityBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Grain  -->
                                <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.FilmGrain.Value}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="GrainSlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        Maximum="100"
                                        Minimum="0"
                                        Value="0" />

                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=GrainSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=GrainSlider}"
                                        Value="{Binding Path=Value, ElementName=GrainSlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetGrainBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Sharpen  -->
                                <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.Sharpen.Value}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="SharpenSlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        Maximum="100"
                                        Minimum="0"
                                        Value="0" />

                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=SharpenSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=SharpenSlider}"
                                        Value="{Binding Path=Value, ElementName=SharpenSlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetSharpenBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Vignette  -->
                                <TextBlock Classes="txt fieldLabel" Text="{Binding Translation.Vignette.Value}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="VignetteSlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        Maximum="100"
                                        Minimum="0"
                                        Value="0" />

                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=VignetteSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=VignetteSlider}"
                                        Value="{Binding Path=Value, ElementName=VignetteSlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetVignetteBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Blur  -->
                                <TextBlock Classes="txt fieldLabel" Text="{CompiledBinding Translation.Blur.Value, Mode=OneWay}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="BlurSlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        LargeChange="1"
                                        Maximum="30"
                                        Minimum="0"
                                        SmallChange="0.1"
                                        TickFrequency="0.1"
                                        Value="0" />

                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=BlurSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=BlurSlider}"
                                        Value="{Binding Path=Value, ElementName=BlurSlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetBlurBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Pencil Sketch  -->
                                <TextBlock Classes="txt fieldLabel" Text="{CompiledBinding Translation.PencilSketch.Value, Mode=OneWay}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="PencilSketchSlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        LargeChange="0.5"
                                        Maximum="6"
                                        Minimum="0"
                                        SmallChange="0.1"
                                        TickFrequency="0.1"
                                        Value="0" />

                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=PencilSketchSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=PencilSketchSlider}"
                                        Value="{Binding Path=Value, ElementName=PencilSketchSlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetPencilSketchBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Posterize  -->
                                <TextBlock Classes="txt fieldLabel" Text="{CompiledBinding Translation.Posterize.Value, Mode=OneWay}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="PosterizeSlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        LargeChange="2"
                                        Maximum="32"
                                        Minimum="0"
                                        SmallChange="1"
                                        TickFrequency="1" />

                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=PosterizeSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=PosterizeSlider}"
                                        Value="{Binding Path=Value, ElementName=PosterizeSlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetPosterizeBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Solarize  -->
                                <TextBlock Classes="txt fieldLabel" Text="{CompiledBinding Translation.Solarize.Value, Mode=OneWay}" />
                                <StackPanel Orientation="Horizontal">
                                    <customControls:CustomSlider
                                        x:Name="SolarizeSlider"
                                        Width="400"
                                        Height="30"
                                        Margin="0,1,10,1"
                                        LargeChange="5"
                                        Maximum="100"
                                        Minimum="0"
                                        SmallChange="1"
                                        TickFrequency="5"
                                        Value="0" />

                                    <NumericUpDown
                                        Maximum="{Binding Path=Maximum, ElementName=SolarizeSlider}"
                                        Minimum="{Binding Path=Minimum, ElementName=SolarizeSlider}"
                                        Value="{Binding Path=Value, ElementName=SolarizeSlider}" />

                                    <customControls:IconButton
                                        x:Name="ResetSolarizeBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12" />
                                </StackPanel>

                                <!--  Black And White Toggle  -->
                                <ToggleButton
                                    x:Name="BlackAndWhiteToggleButton"
                                    Margin="0,12,0,0"
                                    Background="Transparent"
                                    Classes="altHover">
                                    <TextBlock
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Center"
                                        Classes="txt"
                                        Foreground="{StaticResource SecondaryTextColor}"
                                        Text="{CompiledBinding Translation.BlackAndWhite.Value,
                                                               Mode=OneWay}" />
                                </ToggleButton>

                                <!--  Negative Toggle  -->
                                <ToggleButton
                                    x:Name="NegativeToggleButton"
                                    Background="Transparent"
                                    Classes="altHover">
                                    <TextBlock
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Center"
                                        Classes="txt"
                                        Foreground="{StaticResource SecondaryTextColor}"
                                        Text="{CompiledBinding Translation.NegativeColors.Value,
                                                               Mode=OneWay}" />
                                </ToggleButton>

                                <!--  Old Movie  -->
                                <ToggleButton
                                    x:Name="OldMovieToggleButton"
                                    Background="Transparent"
                                    Classes="altHover">
                                    <TextBlock
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Center"
                                        Classes="txt"
                                        Foreground="{StaticResource SecondaryTextColor}"
                                        Text="{CompiledBinding Translation.OldMovie.Value,
                                                               Mode=OneWay}" />
                                </ToggleButton>

                            </StackPanel>
                        </ScrollViewer>
                    </TabItem>

                    <!--  PRESETS TAB  -->
                    <TabItem Margin="0" Header="{Binding Translation.Presets.Value}">
                        <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                            <StackPanel Margin="15,10">
                                <TextBlock Classes="txt sectionHeader" Text="{Binding Translation.SmartPresets.Value}" />

                                <TextBlock
                                    Margin="0,0,0,10"
                                    Classes="txt"
                                    Foreground="{StaticResource SecondaryTextColor}"
                                    Text="{Binding Translation.PresetDescription.Value}" />

                                <StackPanel Orientation="Horizontal">
                                    <ComboBox
                                        x:Name="PresetCombo"
                                        Width="340"
                                        Classes="CStyle"
                                        Foreground="{StaticResource SecondaryTextColor}" />
                                    <Button
                                        x:Name="ApplyPresetBtn"
                                        Width="120"
                                        Margin="10,0,0,0"
                                        Classes="BorderStyle altHover">
                                        <TextBlock
                                            HorizontalAlignment="Center"
                                            Classes="txt"
                                            Foreground="{DynamicResource MainTextColor}"
                                            Text="{Binding Translation.Apply.Value}" />
                                    </Button>
                                    <customControls:IconButton
                                        x:Name="ResetAllBtn"
                                        Width="30"
                                        Margin="5,0,0,0"
                                        Background="{DynamicResource MainButtonBackgroundColor}"
                                        BorderBrush="{DynamicResource MainBorderColor}"
                                        BorderThickness="1"
                                        Classes="hover"
                                        Foreground="{DynamicResource MainTextColor}"
                                        Icon="{StaticResource UndoImage}"
                                        IconHeight="12"
                                        IconWidth="12"
                                        ToolTip.Tip="{Binding Translation.ResetPreset.Value}" />
                                </StackPanel>
                            </StackPanel>
                        </ScrollViewer>
                    </TabItem>

                </TabControl>
            </DockPanel>
        </Border>
    </Panel>
</UserControl>
