<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="clr-namespace:Reloaded.WPF.Controls;assembly=Reloaded.WPF"
                    xmlns:properties="clr-namespace:Reloaded.Mod.Launcher.Controls.Properties;assembly=Reloaded-II">

    <!-- For IntelliSense: Uncomment only when editing. -->
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <controls:SharedResourceDictionary Source="pack://siteoforigin:,,,/Theme/Default/Colours.xaml"/>
                <controls:SharedResourceDictionary Source="pack://siteoforigin:,,,/Theme/Default/Fonts.xaml"/>
                <controls:SharedResourceDictionary Source="pack://siteoforigin:,,,/Theme/Default/Settings.xaml"/>
                <controls:SharedResourceDictionary Source="pack://siteoforigin:,,,/Theme/Default/Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </ResourceDictionary.MergedDictionaries>


    <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxx Animations xxxxxxxxxxxxxxxxxxxxxxxxxxxxx  -->
    <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxx Default Styles xxxxxxxxxxxxxxxxxxxxxxxxxxxxx  -->

    <!-- Base Style -->
    <Style TargetType="{x:Type Control}" x:Key="BaseStyle">
        <Setter Property="FontFamily" Value="{DynamicResource FontLight}" />
        <Setter Property="FontSize" Value="{DynamicResource FontSizeRegular}" />
        <Setter Property="Foreground" Value="{StaticResource TextColorBrush}"/>
        <Setter Property="FocusVisualStyle" Value="{DynamicResource ReloadedFocusVisual}"/>
    </Style>

    <!-- Dark Style Tooltips -->
    <PopupAnimation x:Key="{x:Static SystemParameters.ToolTipPopupAnimationKey}">None</PopupAnimation>
    <Style x:Key="DefaultToolTip"  TargetType="{x:Type ToolTip}" BasedOn="{StaticResource BaseStyle}">
        <Setter Property="FontSize" Value="{DynamicResource FontSizeSmaller}" />
        <Setter Property="FontFamily" Value="{DynamicResource FontBold}"/>
        <Setter Property="Background" Value="{StaticResource TooltipBackgroundColorBrush}"/>
        <Setter Property="properties:MoveTooltipWithMouse.Value" Value="True"/>

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToolTip">
                    <Border Background="{TemplateBinding Background}" CornerRadius="{DynamicResource TooltipCornerRadius}">
                        <TextBlock Text="{TemplateBinding Content}" 
                               Padding="{DynamicResource TooltipPaddingSize}"
                               FontSize="{TemplateBinding FontSize}"
                               FontFamily="{TemplateBinding FontFamily}"
                               Background="Transparent"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Simple ScrollViewer -->
    <Style TargetType="{x:Type ScrollViewer}" BasedOn="{StaticResource {x:Type ScrollViewer}}">
        <Setter Property="Focusable" Value="False" />
    </Style>

    <Style x:Key="VerticalSeparator" TargetType="{x:Type Separator}" BasedOn="{StaticResource DefaultSeparatorStyle}">
        <Setter Property="LayoutTransform">
            <Setter.Value>
                <RotateTransform Angle="90"/>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxx Default Styles xxxxxxxxxxxxxxxxxxxxxxxxxxxxx  -->
    <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxx Style Bindings xxxxxxxxxxxxxxxxxxxxxxxxxxxxx  -->

    <!-- The following styles will be automatically applied to new controls. -->

    <Style TargetType="{x:Type ToolTip}" BasedOn="{StaticResource DefaultToolTip}"/>
    
    <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Transitions xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  -->
    
    <!-- Border <==> Accent Dark Color -->
    <Storyboard x:Key="BackgroundFadeBorderToAccentDark"
                Storyboard.TargetProperty="Background.Color">
        <ColorAnimation
            From="{StaticResource BorderColor}"
            To="{StaticResource AccentColorDark}"
            Duration="{StaticResource ColorTransitionDuration}"
        />
    </Storyboard>

    <Storyboard x:Key="BackgroundFadeAccentDarkToBorder"
                Storyboard.TargetProperty="Background.Color">
        <ColorAnimation
            From="{StaticResource AccentColorDark}"
            To="{StaticResource BorderColor}"
            Duration="{StaticResource ColorTransitionDuration}"
        />
    </Storyboard>
    
    <Storyboard x:Key="BackgroundFadeBorderToAccentDarker"
                Storyboard.TargetProperty="Background.Color">
        <ColorAnimation
            From="{StaticResource BorderColor}"
            To="{StaticResource AccentColorDarker}"
            Duration="{StaticResource ColorTransitionDuration}"
        />
    </Storyboard>

    <Storyboard x:Key="BackgroundFadeAccentDarkerToBorder"
                Storyboard.TargetProperty="Background.Color">
        <ColorAnimation
            From="{StaticResource AccentColorDarker}"
            To="{StaticResource BorderColor}"
            Duration="{StaticResource ColorTransitionDuration}"
        />
    </Storyboard>

    <SolidColorBrush x:Key="PopupBackgroundBrush" Color="{DynamicResource TooltipBackgroundColor}" Opacity="0.9"/>
</ResourceDictionary>