<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="clr-namespace:HandBrakeWPF.Controls"
                    xmlns:converters="clr-namespace:HandBrakeWPF.Converters">

    <Style x:Key="LongToolTipHolder" TargetType="FrameworkElement" >
        <Setter Property="ToolTipService.ShowDuration" Value="20000" />
    </Style>

    <Style TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
        <Setter Property="MinHeight" Value="23"/>
        <Setter Property="Margin" Value="0,2,0,2" />
        <Setter Property="ToolTipService.ShowDuration" Value="20000" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
    </Style>

    <Style TargetType="{x:Type Slider}" BasedOn="{StaticResource {x:Type Slider}}">
        <Setter Property="ToolTipService.ShowDuration" Value="20000" />
    </Style>

    <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>

    <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="MinHeight" Value="23"/>
    </Style>

    <Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
        <Setter Property="MinHeight" Value="23"/>
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Padding" Value="8,2" />
    </Style>

    <Style TargetType="{x:Type RadioButton}">
        <Setter Property="Margin" Value="0,0,0,8" />
    </Style>

    <Style TargetType="{x:Type controls:NumberBox}" >
        <Setter Property="MinHeight" Value="23"/>
        <Setter Property="Margin" Value="0,2,0,2" />
        <Setter Property="ToolTipService.ShowDuration" Value="20000" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

    <Style TargetType="{x:Type ToggleButton}" >
        <Setter Property="MinHeight" Value="23"/>
        <Setter Property="Margin" Value="0,2,0,2" />
        <Setter Property="ToolTipService.ShowDuration" Value="20000" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

    <Style TargetType="ToolTip" BasedOn="{StaticResource {x:Type ToolTip}}">
        <Style.Resources>
            <Style TargetType="ContentPresenter">
                <Style.Resources>
                    <Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
                        <Setter Property="TextWrapping" Value="Wrap" />
                    </Style>
                </Style.Resources>
            </Style>
        </Style.Resources>
        <Setter Property="MaxWidth" Value="500" />
    </Style>

    <Style TargetType="{x:Type CheckBox}">
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Margin" Value="0,2,0,2" />
    </Style>

    <Style x:Key="DropButtonStyle" TargetType="ToggleButton"  BasedOn="{StaticResource {x:Type ToggleButton}}">
        <Setter Property="Padding" Value="2,2" />
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid VerticalAlignment="Stretch">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <TextBlock Text="{TemplateBinding Content}" Margin="4,0,0,0" Grid.Column="0" />

                        <!--<Rectangle Grid.Column="1" Width="1" Fill="Black" Opacity="0.4" Margin="6,2,0,2"/>-->

                        <Path Data="M 0,0 L 8,0 L 4,4 Z" Fill="Black" Grid.Column="2" Margin="4,0,4,0" VerticalAlignment="Center"/>
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ModernListBoxItemStyle" TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="Padding" Value="8,6"/>
    </Style>

    <!-- Fixes HorizontalContentAlignment and VerticalContentAlignment binding errors that you get when you setup MenuItems by binding their ItemSource property -->
    <!-- https://social.msdn.microsoft.com/Forums/vstudio/en-US/42cd1554-de7a-473b-b977-ddbd6298b3d0/binding-error-when-using-compositecollection-for-menuitems?forum=wpf -->
    <Style TargetType="MenuItem" BasedOn="{StaticResource {x:Type MenuItem}}">
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
    </Style>

    <Style x:Key="subText" TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}">
        <Setter Property="FontWeight" Value="Regular" />
        <Setter Property="FontSize" Value="12" />
        <Setter Property="FontStyle" Value="Italic" />
    </Style>

    <Style x:Key="subTextSmall" TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}">
        <Setter Property="FontWeight" Value="Regular" />
        <Setter Property="FontSize" Value="11" />
    </Style>

    <Style x:Key="sectionHeader" TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}">
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="FontSize" Value="12" />
    </Style>

    <Style x:Key="subHeader" TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}">
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="FontSize" Value="14" />
    </Style>

    <Style x:Key="subHeaderSmall" TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}">
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="FontSize" Value="12" />
    </Style>

    <Style x:Key="pageHeader" TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}">
        <Setter Property="FontWeight" Value="Regular" />
        <Setter Property="FontSize" Value="22" />
    </Style>

    <Style x:Key="windowTitle" TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}">
        <Setter Property="FontWeight" Value="Regular" />
        <Setter Property="FontSize" Value="26" />
    </Style>

</ResourceDictionary>