<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
    xmlns:m="clr-namespace:ModernWpf.Markup;assembly=modernwpf"
    xmlns:s="clr-namespace:System;assembly=mscorlib">

    <!--  Light base  -->
    <!--  Keep this line, and change depending on if Light or Dark theme; case sensitive  -->

    <!--
        Theme Author: Milos Paripovic
        
        Copy the whole Theme folder from /Themes/ and do mods there (themes with same name as official ones will be overwritten on program update)
        
        If the syntax is broken, it will load default theme (may cause crashes also)
        
        Keys may change in the future.
        
        You can use color chart from http://i.msdn.microsoft.com/dynimg/IC210551.png
        so instead of Color="#000000" you can write Color="Black"
        
        Brushes can be any XAML color brush type, value can be RGB or ARGB
        
        Suggestion: Use Notepad++ with XML coloring, or other code editor with syntax highlighting
        
        Pressing Ctrl+Shift+Alt+F5 reloads the theme so it is useful for editing themes, but not all keys will be reloaded as some require a restart
    -->


    <Color x:Key="GrayLevel0Color">#ffffff</Color>
    <Color x:Key="GrayLevel1Color">#fdfdfd</Color>
    <Color x:Key="GrayLevel2Color">#fbfbfb</Color>
    <Color x:Key="GrayLevel3Color">#e8e8e8</Color>
    <Color x:Key="GrayBorderColor">#e3e3e3</Color>

    <SolidColorBrush x:Key="GrayLevel0" Color="{StaticResource GrayLevel0Color}" />
    <SolidColorBrush x:Key="GrayLevel1" Color="{StaticResource GrayLevel1Color}" />
    <SolidColorBrush x:Key="GrayLevel2" Color="{StaticResource GrayLevel2Color}" />
    <SolidColorBrush x:Key="GrayLevel3" Color="{StaticResource GrayLevel3Color}" />
    <SolidColorBrush x:Key="GrayBorderBrush" Color="{StaticResource GrayBorderColor}" />


    <Thickness x:Key="WindowPadding">0,0,0,1</Thickness>
    <!--  margin/padding in XAML is in order Left,Top,Right,Bottom  -->


    <SolidColorBrush x:Key="WindowAcrylicTintBrush" Color="#bcffffff" />

    <!--  when window is not focused it will show the MainBackgroundBrush  -->
    <SolidColorBrush x:Key="MainBackgroundBrush" Color="#ffffff" />
    <!--  for other windows that don't have Acrylic effect  -->
    <SolidColorBrush x:Key="DialogBackgroundBrush" Color="#f0f0f0" />
    <SolidColorBrush x:Key="SidebarBackgroundBrush" Color="Transparent" />
    <!--  Transparent to have Acrylic effect on side  -->

    <SolidColorBrush x:Key="PathEditPopupBackgroundBrush" Color="Transparent" />

    <SolidColorBrush x:Key="TextPrimaryBrush" Color="#000000" />
    <!--  set value to {DynamicResource SystemControlPageTextBaseHighBrush} to use the theme one  -->

    <!--  Main style for text; Foreground color should be same as TextPrimaryBrush  -->
    <Style x:Key="{x:Type TextBlock}" TargetType="TextBlock">
        <Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
    </Style>

    <!--  Highlighted Text, like GB portion of file size, or number of selected files. Can be the same as TextPrimaryBrush to keep the same color  -->
    <SolidColorBrush x:Key="TextImportantBrush" Color="#214c8b" />

    <!--  Secondary Text, like extension in File, or path in Favorites  -->
    <SolidColorBrush x:Key="TextUnimportantBrush" Color="#405060" />

    <!--  For grid view only for now. I use value from CurrentFolderPanelBackgroundBrush (unless transparent) and change alpha part to BE to give it transparency  -->
    <SolidColorBrush x:Key="TextBackgroundOverlayBrush" Color="#BEffffff" />

    <!--  Sidebar - Favorites  -->
    <!--<Thickness x:Key="ProgramNameMargin">0,8,0,10</Thickness>-->


    <!--  Favorites Group  -->
    <Thickness x:Key="FavoritesPanelMargin">0,1,8,0</Thickness>
    <!--
        At least 1 for top so the New Group button doesn't blend with last Fav group
        8 on the side for a narrow scrollbar that appears when not all favs can fit vertically in the window
    -->

    <s:Double x:Key="SidebarCollapsedWidth">31</s:Double>
    <!--  Should be minimum button width + SidebarResizerBorder Thickness  -->

    <Style x:Key="PathPanelGroupBorder" TargetType="{x:Type Border}">
        <!--<Setter Property="Background" Value="{DynamicResource SystemControlPageBackgroundChromeMediumLowBrush}" />-->
        <Setter Property="Margin" Value="0,0,0,4" />
        <Setter Property="Padding" Value="4,0,12,4" />
        <Setter Property="CornerRadius" Value="0" />
    </Style>

    <Style x:Key="PathPanelGroupTitle" TargetType="{x:Type TextBlock}">
        <!--  BasedOn="{StaticResource {x:Type TextBlock}}"> Can't be DynamicResource :/  -->
        <Setter Property="Margin" Value="6,0,0,0" />
        <!--<Setter Property="FontSize" Value="14" />-->
        <Setter Property="Foreground" Value="{DynamicResource SystemControlPageTextBaseHighBrush}" />
    </Style>

    <SolidColorBrush x:Key="PathPanelItemBackgroundBrush" Color="Transparent" />
    <!--  Can be same as Transparent of shade similar to background of PathPanelGroupBorder  -->

    <!--  File Browser Panel  -->

    <SolidColorBrush x:Key="CurrentFolderPanelBackgroundBrush" Color="#e9ffffff" />
    <SolidColorBrush x:Key="NavigationPanelBackgroundBrush.StandardLayout" Color="{StaticResource GrayLevel1Color}" />
    <SolidColorBrush x:Key="NavigationPanelBackgroundBrush.ColumnsLayout" Color="{StaticResource GrayLevel1Color}" />
    <!--  Make transparent to show acrylic effect underneath, otherwise make the same as FilesPanelBorder background (below)  -->
    <!--  Will be visible only when there is no Files Panel is covering it  -->
    <Style x:Key="FilesPanelBorder" TargetType="{x:Type Border}">
        <!--
            Improvization because I wanted here columns in Standard layout to have differnet background than the onse in Columns layout, and we can't do transparent because it would look ugly when animating folder opening"
            This inherits brush from NavigationPanelBackgroundBrush
        -->
        <!--<Setter Property="Background" Value="{Binding Path=Background, RelativeSource={RelativeSource Mode=FindAncestor,
            AncestorType={x:Type Control}, AncestorLevel=3}}" />-->
        <Setter Property="Margin" Value="0,0,-8,0" />

        <Style.Triggers>
            <DataTrigger Binding="{Binding IsCurrent, RelativeSource={RelativeSource TemplatedParent}}" Value="True">
                <Setter Property="Background" Value="#ffffff" />

                <Setter Property="BorderThickness" Value="1,1,0,0" />
                <Setter Property="BorderBrush" Value="{StaticResource GrayBorderBrush}" />
                <Setter Property="CornerRadius" Value="8,0,0,0" />
            </DataTrigger>
        </Style.Triggers>


        <!--<Setter Property="Margin" Value="0,28,0,0"/>-->
        <!--<Setter Property="Effect" Value="{DynamicResource PanelShadowEffect}"/>-->
        <!--  Real shadow is very computationally expensive so we use gradient to fake it (see below)  -->
    </Style>

    <!--
        This is a fake shadow made with a gradient on the right side of Files Panel
        (much faster than shadow effect)
        It also includes border in the accent color (see BorderThickness)
    -->
    <Style x:Key="FilesPanelEdgeBorder" TargetType="{x:Type Border}">
        <Setter Property="Margin" Value="0,0,-8,0" />
        <Setter Property="BorderThickness" Value="1,1,0,0" />
        <Setter Property="BorderBrush" Value="{StaticResource GrayBorderBrush}" />
        <Setter Property="Background" Value="{StaticResource GrayLevel1}" />

        <Setter Property="CornerRadius" Value="8,0,0,0" />

        <!--<Setter Property="Width" Value="24" />
        <Setter Property="Margin" Value="0,1,-16,0" />
        <Setter Property="CornerRadius" Value="8,0,0,0" />
    <Setter Property="BorderThickness" Value="8,2,0,0" />
    <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="BorderBrush" >
            <Setter.Value>
                <LinearGradientBrush StartPoint="0,0" EndPoint="1,0" >
                    <GradientStop Offset="0" Color="{StaticResource GrayLevel1Color}" />
                    <GradientStop Offset=".6" Color="{StaticResource GrayLevel3Color}" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>-->

        <!--<Setter Property="Background" Value="#fafafa"/>-->
        <!--<Setter Property="Background" >
            <Setter.Value>
                <LinearGradientBrush StartPoint="0,0" EndPoint="1,0" MappingMode="RelativeToBoundingBox">
                    <GradientStop Offset="0" Color="#00fafafa" />
                    <GradientStop Offset=".66" Color="#30000000" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>-->
        <!--<Setter Property="Background" Value="Transparent">

        </Setter>-->
    </Style>

    <!--  top of the fake shadow is faded out with this  -->
    <Style x:Key="FilesPanelEdgeTopBorder" TargetType="{x:Type Border}">

        <Setter Property="Width" Value="12" />
        <Setter Property="Margin" Value="0,-1,-8,0" />
        <Setter Property="CornerRadius" Value="10,0,0,0" />
        <Setter Property="BorderThickness" Value="4,2,0,0" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                    <GradientStop Offset="0" Color="{StaticResource GrayLevel1Color}" />
                    <GradientStop Offset=".6" Color="{StaticResource GrayLevel3Color}" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <!--<Setter Property="Background" Value="{StaticResource GrayLevel3}"/>-->

        <!--<Setter Property="VerticalAlignment" Value="Stretch" />
    <Setter Property="HorizontalAlignment" Value="Left" />
    <Setter Property="Width" Value="10" />
        <Setter Property="Margin" Value="6,2,0,0"/>
        <Setter Property="Background" >
            <Setter.Value>
                <LinearGradientBrush StartPoint="0,0" EndPoint="10,0" MappingMode="Absolute">
                    <GradientStop Offset="0" Color="{StaticResource GrayLevel0Color}" />
                    <GradientStop Offset="1" Color="{StaticResource GrayLevel1Color}" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>-->

        <!--<Setter Property="OpacityMask">
            <Setter.Value>
                <LinearGradientBrush MappingMode="Absolute" StartPoint="0,8" EndPoint="0,9">
                    <GradientStop Offset="0" Color="#ffffffff" />
                    <GradientStop Offset="1" Color="#00000000" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>-->
    </Style>

    <!--  Changing height requires program restart for columns exxpanding to be properly set  -->
    <s:Double x:Key="FilesPanelTitleHeight">30</s:Double>
    <Thickness x:Key="FilesPanelSortControlMargin">0,32,0,0</Thickness>
    <Thickness x:Key="FilesPanelContentMargin">0,54,0,0</Thickness>



    <Style x:Key="FilesPanelTitle" TargetType="{x:Type TextBlock}">
        <Setter Property="Margin" Value="10,4,0,0" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="Foreground" Value="{DynamicResource SystemControlPageTextBaseHighBrush}" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="{DynamicResource SystemControlForegroundAccentBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="FilesPanelPathSeparator" TargetType="{x:Type TextBlock}">
        <Setter Property="Text" Value="\" />
        <!--  Here you can set another path separator like >  -->

        <Setter Property="Margin" Value="0,4,0,0" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="Foreground" Value="{DynamicResource TextUnimportantBrush}" />
    </Style>

    <Style x:Key="PreviewPanelBorder" TargetType="{x:Type Border}">
        <Setter Property="Background" Value="#fafafa" />
        <!--  Make the same as FilesPanelBorder Background to make it seem like one  -->
    </Style>
    <Style x:Key="PreviewPanelBorder.ColumnsLayout" TargetType="{x:Type Border}">
        <Setter Property="Background" Value="#ffffff" />
        <!--  Make the same as FilesPanelBorder Background to make it seem like one  -->
    </Style>
    <s:Double x:Key="PreviewPanelMinHeight">28</s:Double>



    <!--  for files/folders within Files Panels  -->

    <Thickness x:Key="ListItemMargin">8,0,0,0</Thickness>


    <SolidColorBrush x:Key="ListItemEvenBackgroundBrush" Color="Transparent" />
    <SolidColorBrush x:Key="ListItemOddBackgroundBrush" Color="Transparent" />
    <SolidColorBrush x:Key="ListItemToDoBackgroundBrush" Color="#ccffe69c" />
    <SolidColorBrush x:Key="ListItemToDoDoneBackgroundBrush" Color="#ccffedb8" />
    <SolidColorBrush x:Key="ListItemToDoForegroundBrush" Color="#000000" />



    <!--  File/Path effect on mouseOver. Set ShadowDepth and Opacity 0 to turn off  -->
    <DropShadowEffect
        x:Key="HoverItemEffect"
        BlurRadius="6"
        Direction="315"
        Opacity=".5"
        ShadowDepth="1"
        Color="Black" />

    <DropShadowEffect
        x:Key="ShadowEffectLevel2"
        BlurRadius="1"
        Direction="45"
        Opacity=".1"
        ShadowDepth="1"
        Color="Black" />



    <!--  For dialogs/popups  -->
    <DropShadowEffect
        x:Key="PopupShadowEffect"
        BlurRadius="10"
        Direction="270"
        Opacity=".4"
        ShadowDepth="6"
        Color="Black" />
    <Thickness x:Key="ShadowThickness">10,10,10,30</Thickness>

    <Style x:Key="ContextMenuBorder" TargetType="Border">
        <!--  This is not Shell Context menu - no way to change that yet  -->
        <Setter Property="BorderBrush" Value="{StaticResource GrayBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Background" Value="{StaticResource GrayLevel1}" />
        <Setter Property="Padding" Value="0,4,0,4" />
        <Setter Property="CornerRadius" Value="4" />
    </Style>

    <Style x:Key="PopupPanelBorder" TargetType="{x:Type Border}">
        <Setter Property="Background" Value="{DynamicResource SystemControlPageBackgroundChromeLowBrush}" />
        <Setter Property="Effect" Value="{DynamicResource PopupShadowEffect}" />
        <Setter Property="BorderBrush" Value="{StaticResource GrayBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="0,4,0,4" />
        <Setter Property="CornerRadius" Value="4" />
    </Style>

    <!--  For now only to control the corner radius; may be removed in the future  -->
    <Style x:Key="ItemSelectionBorder" TargetType="{x:Type Border}">
        <Setter Property="CornerRadius" Value="4,0,0,4" />
    </Style>

    <!--  Base folder style in Files Panel  -->
    <Style x:Key="FolderItemDefaultBorder" TargetType="{x:Type Border}">
        <!--  Uncomment for a border around folders only  -->
        <!--<Setter Property="BorderBrush" Value="Green"/>
        <Setter Property="BorderThickness" Value="1,1,0,1" />
        <Setter Property="CornerRadius" Value="5,0,0,5" />
        <Setter Property="Margin" Value="-0.5" /> to avoid double border-->
        <Setter Property="Margin" Value="0,0,-1,0" />
        <Setter Property="Background" Value="Transparent" />
        <!--  Background must be defined, even transparent, in order for drag&drop to work  -->
    </Style>

    <!--  Folder style when selected in ancestor (non-current) Files Panel  -->
    <Style x:Key="FolderItemSelectedBorder" TargetType="{x:Type Border}">
        <Setter Property="CornerRadius" Value="4,0,0,4" />
        <!--<Setter Property="BorderThickness" Value="2,2,0,2" />
        <Setter Property="BorderBrush" Value="{DynamicResource SystemControlForegroundAccentBrush}" />-->

        <Setter Property="Background" Value="Transparent" />
        <!--  best if the same as FilesPanelBorder so parent folder blend into child panel  -->
    </Style>

    <!--
        Folder style when selected in current (most-right) Files Panel
        Set CornerRadius to 0 for sharp edges
    -->
    <Style x:Key="FolderItemSelectedInCurrentBorder" TargetType="{x:Type Border}">
        <Setter Property="CornerRadius" Value="4" />
        <Setter Property="BorderThickness" Value="0" />

        <Setter Property="Background" Value="Transparent" />
    </Style>

    <!--  Tabs  -->
    <Style x:Key="ProgramNameBorder" TargetType="{x:Type Border}">
        <Setter Property="Height" Value="38" />
        <Setter Property="Margin" Value="10,0,19,0" />
        <!--for doubleclick to maximize-->
        <Setter Property="Background" Value="Transparent" />
    </Style>

    <Style x:Key="TabsContainerBorder" TargetType="{x:Type Border}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Height" Value="38" />
        <Setter Property="Margin" Value="0,0,0,0" />
        <!--  if we add margin here, then shadows are cropped  -->
        <Setter Property="Padding" Value="0,0,0,0" />
    </Style>

    <Thickness x:Key="TabItemPadding">4,2,2,4</Thickness>
    <!--  was 4,4,28,0 to leave space for close button  -->

    <Style x:Key="TabItemDefaultBorder" TargetType="{x:Type Border}">
        <Setter Property="CornerRadius" Value="4,4,0,0" />
        <!--  Set CornerRadius to 0 for sharp edges  -->
        <Setter Property="BorderBrush" Value="#e5e5e5" />
        <Setter Property="BorderThickness" Value="1,1,1,0" />
        <Setter Property="Background" Value="#f0f0f0" />
        <Setter Property="Padding" Value="5,0,0,0" />
        <Setter Property="Margin" Value="0,4,2,4" />
    </Style>

    <Style x:Key="TabItemHoverBorder" TargetType="{x:Type Border}">
        <Setter Property="CornerRadius" Value="4,4,0,0" />

        <!--  Uncomment for border around non-active tab  -->
        <!--<Setter Property="BorderThickness" Value="1,1,0,1"/>
        <Setter Property="BorderBrush" Value="Transparent" />-->
        <Setter Property="Background" Value="{DynamicResource SystemControlHighlightListAccentLowBrush}" />
        <Setter Property="Padding" Value="5,2,0,0" />
        <Setter Property="Margin" Value="0,4,2,3" />
        <Setter Property="Effect" Value="{DynamicResource HoverItemEffect}" />
        <Setter Property="ClipToBounds" Value="True" />
    </Style>

    <Style x:Key="TabItemSelectedBorder" TargetType="{x:Type Border}">
        <Setter Property="CornerRadius" Value="4,4,0,0" />
        <Setter Property="BorderThickness" Value="1,1,1,0" />
        <Setter Property="Padding" Value="0,0,2,0" />
        <Setter Property="Margin" Value="0,4,2,3" />
        <Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderBrush}" />
        <Setter Property="Background" Value="#fcfcfc" />
        <Setter Property="Effect" Value="{DynamicResource ShadowEffectLevel2}" />
        <!--  best if the same as FilesPanelBorder so parent folder blend into child panel  -->
    </Style>



    <Style x:Key="TabsBottomBarBorder" TargetType="{x:Type Border}">
        <Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderBrush}" />
        <Setter Property="BorderThickness" Value="1,1,1,0" />
        <Setter Property="Height" Value="4" />

        <Setter Property="Background" Value="#fcfcfc" />
    </Style>

    <!--  Message panel  -->

    <Style x:Key="MessagePanelBorder" TargetType="{x:Type Border}">
        <Setter Property="Background" Value="#DEDEDE" />
        <!--  made the same as inactive tab color so it doesn't merge with files pane  -->
        <!--<Setter Property="BorderBrush" Value="Gray" />
        <Setter Property="BorderThickness" Value="0,1,0,1" />-->
    </Style>
    <SolidColorBrush x:Key="MessageSuccessBackgroundBrush" Color="#b8e5b8" />
    <SolidColorBrush x:Key="MessageErrorBackgroundBrush" Color="IndianRed" />
    <SolidColorBrush x:Key="MessageInfoBackgroundBrush" Color="Transparent" />

    <!--  Other  -->

    <SolidColorBrush x:Key="ScrollBarTrackBrush" Color="#20888888" />
    <SolidColorBrush x:Key="ScrollBarThumbBrush" Color="#ae888888" />
    <SolidColorBrush x:Key="ScrollBarThumbHoverBrush" Color="#c0888888" />

    <!--  For background overlay when popup is open  -->
    <SolidColorBrush
        x:Key="OverlayBrush"
        Opacity=".15"
        Color="#000000" />

    <!--  Flash item or right-click  -->
    <SolidColorBrush x:Key="FlashBrush" Color="#afd9fa" />

    <SolidColorBrush
        x:Key="OverlayInactiveBrowserBrush"
        Opacity=".045"
        Color="#000000" />

    <!--  For panel overlay whey dual-panel is being collapsed  -->
    <SolidColorBrush
        x:Key="OverlayCollapsingBrowserBrush"
        Opacity=".8"
        Color="#f0f0f0" />


    <SolidColorBrush x:Key="ResizerBrush" Color="#ececec" />
    <SolidColorBrush x:Key="ResizerHoverBrush" Color="LightGray" />

    <Style x:Key="ResizerBorderBase" TargetType="{x:Type Border}">
        <Setter Property="BorderBrush" Value="{DynamicResource ResizerBrush}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="MinWidth" Value="6" />
        <Setter Property="MinHeight" Value="6" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource ResizerHoverBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style
        x:Key="BrowserDividerVerticalBorder"
        BasedOn="{StaticResource ResizerBorderBase}"
        TargetType="{x:Type Border}">
        <Setter Property="BorderBrush" Value="{StaticResource GrayBorderBrush}" />
        <Setter Property="BorderThickness" Value="1,0,1,0" />
        <Setter Property="Width" Value="16" />
        <Setter Property="Margin" Value="-1,34,-1,0" />
        <!--  36 from TabsContainer height  -->
    </Style>
    <Style
        x:Key="BrowserDividerHorizontalBorder"
        BasedOn="{StaticResource ResizerBorderBase}"
        TargetType="{x:Type Border}">
        <!--<Setter Property="BorderBrush" Value="#04AAAC" />-->
        <Setter Property="BorderThickness" Value="0,1,0,0" />
    </Style>
    <Style
        x:Key="SidebarResizerBorder"
        BasedOn="{StaticResource ResizerBorderBase}"
        TargetType="{x:Type Border}">
        <Setter Property="BorderThickness" Value="0,0,1,0" />
        <Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderBrush}" />

        <Setter Property="Margin" Value="0,35,-1,0" />
        <!--  36 from TabsContainer height  -->
    </Style>
    <Style
        x:Key="NavigationPanelResizerBorder"
        BasedOn="{StaticResource ResizerBorderBase}"
        TargetType="{x:Type Border}">
        <!--<Setter Property="BorderBrush" Value="#04AAAC" />-->
        <Setter Property="BorderThickness" Value="0,0,0,0" />
    </Style>
    <Style
        x:Key="PreviewResizerHorizontalBorder"
        BasedOn="{StaticResource ResizerBorderBase}"
        TargetType="{x:Type Border}">
        <Setter Property="BorderThickness" Value="0,1,0,0" />
        <Setter Property="Margin" Value="0,0,0,0" />
    </Style>
    <Style
        x:Key="PreviewResizerVerticalBorder"
        BasedOn="{StaticResource ResizerBorderBase}"
        TargetType="{x:Type Border}">
        <Setter Property="BorderThickness" Value="1,0,0,0" />
        <Setter Property="Margin" Value="0,0,0,0" />
    </Style>
    <Style
        x:Key="FileDetailsResizerHorizontalBorder"
        BasedOn="{StaticResource ResizerBorderBase}"
        TargetType="{x:Type Border}">
        <!--<Setter Property="BorderBrush" Value="Transparent" />-->
        <Setter Property="BorderThickness" Value="0,1,0,0" />
        <Setter Property="Height" Value="8" />
    </Style>
    <Style
        x:Key="FileDetailsResizerVerticalBorder"
        BasedOn="{StaticResource ResizerBorderBase}"
        TargetType="{x:Type Border}">
        <Setter Property="BorderThickness" Value="1,0,0,0" />
        <Setter Property="Width" Value="8" />
    </Style>


    <s:Boolean x:Key="UseCustomUIElements">True</s:Boolean>
    <CornerRadius x:Key="UICornerRadius">3</CornerRadius>
    <!--  for some buttons for now  -->

    <SolidColorBrush x:Key="TooltipBackgroundBrush" Color="#eeeeee" />

    <!--  Line indicating Files Panel has been scrolled; may be renamed/removed in the future  -->
    <SolidColorBrush x:Key="BrushDimGraphics" Color="#b0b0b0" />



    <!--  For Sort-Arrows for now  -->
    <SolidColorBrush x:Key="ToggleOnBrush" Color="#000000" />
    <SolidColorBrush x:Key="ToggleOffBrush" Color="#708090" />


    <SolidColorBrush x:Key="CaretBrush" Color="#000000" />


    <CornerRadius x:Key="ControlCornerRadius">4</CornerRadius>

    <!--  Since we have Button defined up there with a different resource, the Button brushes below won't have effect on main buttons, but are still needed for some other elements  -->

    <SolidColorBrush x:Key="ButtonBackgroundBrush" Color="{StaticResource GrayLevel0Color}" />
    <SolidColorBrush x:Key="IconButtonBackgroundBrush" Color="{StaticResource GrayLevel0Color}" />

    <SolidColorBrush x:Key="ButtonBackgroundPointerOverBrush" Color="{StaticResource GrayLevel1Color}" />
    <!--  was GrayLevel1Color  -->
    <SolidColorBrush x:Key="ButtonBackgroundPressedBrush" Color="{StaticResource GrayLevel2Color}" />
    <SolidColorBrush x:Key="ButtonBackgroundDisabledBrush" Color="{StaticResource GrayLevel3Color}" />

    <!--  foreground controls don't work - controlstyles 79 ???  -->
    <SolidColorBrush x:Key="ButtonForegroundBrush" Color="#000000" />
    <SolidColorBrush x:Key="ButtonForegroundPointerOverBrush" Color="#000000" />
    <SolidColorBrush x:Key="ButtonForegroundPressedBrush" Color="#000000" />
    <SolidColorBrush x:Key="ButtonForegroundDisabledBrush" Color="#9f9f9f" />

    <SolidColorBrush x:Key="ButtonBorderBrush" Color="{StaticResource GrayBorderColor}" />
    <SolidColorBrush x:Key="ButtonBorderPointerOverBrush" Color="{StaticResource GrayBorderColor}" />
    <SolidColorBrush x:Key="ButtonBorderPressedBrush" Color="{StaticResource GrayBorderColor}" />
    <SolidColorBrush x:Key="ButtonBorderDisabledBrush" Color="{StaticResource GrayBorderColor}" />

    <!--  not used  -->
    <!--<SolidColorBrush x:Key="ButtonForeground" Color="{m:StaticColor SystemBaseHighColor}" />
    <SolidColorBrush
        x:Key="ButtonBackgroundPointerOver"
        Opacity="0.1"
        Color="{m:StaticColor SystemBaseHighColor}" />
    <m:StaticResource x:Key="ButtonBackgroundPressedBrush" ResourceKey="SystemControlBackgroundBaseMediumLowBrush" />
    -->

    <Thickness x:Key="ButtonBorderThickness">1</Thickness>
    <Thickness x:Key="ButtonPadding">4,0,4,0</Thickness>
    <s:Double x:Key="ButtonMinSize">28</s:Double>

    <Style x:Key="ScrollIndicatorLine" TargetType="{x:Type Line}">
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="Stretch" Value="Fill" />
        <Setter Property="StrokeThickness" Value="4" />
        <Setter Property="X2" Value="1" />
        <Setter Property="OpacityMask">
            <Setter.Value>
                <LinearGradientBrush MappingMode="RelativeToBoundingBox" StartPoint="0,0" EndPoint="1,0">
                    <GradientStop Offset="0" Color="#00000000" />
                    <GradientStop Offset="0.2" Color="#ffffffff" />
                    <GradientStop Offset="0.8" Color="#ffffffff" />
                    <GradientStop Offset="1" Color="#00000000" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
    </Style>

    <LinearGradientBrush x:Key="ScrollIndicatorTopBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#18000000" />
        <GradientStop Offset="1" Color="#00000000" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ScrollIndicatorBottomBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="1" Color="#22000000" />
        <GradientStop Offset="0" Color="#00000000" />
    </LinearGradientBrush>


    <DropShadowEffect
        x:Key="ButtonHoverEffect"
        BlurRadius="4"
        Direction="275"
        Opacity=".6"
        ShadowDepth="1"
        Color="Black" />

    <Style x:Key="DefaultButton" TargetType="{x:Type Button}">
        <!--  x:Key="ModernButton"  -->
        <!--  modified from ModernWPF to adjust padding and added minheight  -->
        <Setter Property="OverridesDefaultStyle" Value="True" />
        <Setter Property="Background" Value="{DynamicResource ButtonBackgroundBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource ButtonForegroundBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderBrush}" />
        <Setter Property="BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
        <Setter Property="Padding" Value="{DynamicResource ButtonPadding}" />
        <Setter Property="MinHeight" Value="{DynamicResource ButtonMinSize}" />
        <Setter Property="MinWidth" Value="{DynamicResource ButtonMinSize}" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
        <Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="TextBlock.Foreground" Value="{DynamicResource ButtonForegroundBrush}" />

        <Setter Property="Template">


            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <!--<ControlTemplate.Resources>
                        <Style TargetType="ToolTip" BasedOn="{StaticResource ToolTipEx}">
                            <Setter Property="Background" Value="Red" />
                        </Style>
                    </ControlTemplate.Resources>-->

                    <Grid x:Name="Background" UseLayoutRounding="True">
                        <Border
                            x:Name="EffectBorder"
                            Margin="1"
                            Padding="{TemplateBinding Padding}"
                            Background="{TemplateBinding Background}"
                            CornerRadius="2" />
                        <Border
                            x:Name="Border"
                            Padding="{TemplateBinding Padding}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="2">
                            <ContentPresenter
                                x:Name="ContentPresenter"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Content="{TemplateBinding Content}"
                                ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                Focusable="False"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                                <ContentPresenter.Resources>
                                    <Style TargetType="{x:Type TextBlock}">
                                        <Setter Property="OverridesDefaultStyle" Value="True" />
                                        <!--  or the foreground change wont work  -->
                                        <!--<Setter Property="Foreground" Value="{DynamicResource ButtonForegroundBrush}" /> cant set it here-->
                                    </Style>
                                </ContentPresenter.Resources>
                            </ContentPresenter>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Border" Property="Background" Value="#33cccccc" />

                            <Setter TargetName="Border" Property="BorderBrush" Value="#aaaaaa" />
                            <!--<Setter TargetName="Border" Property="Margin" Value="1" />-->

                            <Setter TargetName="ContentPresenter" Property="TextBlock.Foreground" Value="{DynamicResource ButtonForegroundPointerOverBrush}" />
                            <!--<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ButtonForegroundPointerOverBrush}" />-->
                            <!--<Setter TargetName="ContentPresenter" Property="TextBlock.Foreground" Value="Red" />-->
                            <Setter TargetName="EffectBorder" Property="Effect" Value="{DynamicResource ButtonHoverEffect}" />
                            <Setter Property="Panel.ZIndex" Value="1000" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="Background" Property="Background" Value="{DynamicResource ButtonBackgroundPressedBrush}" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource SystemControlForegroundAccentBrush}" />
                            <Setter TargetName="ContentPresenter" Property="TextBlock.Foreground" Value="{DynamicResource ButtonForegroundPressedBrush}" />
                            <Setter TargetName="EffectBorder" Property="Effect" Value="{x:Null}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Background" Property="Background" Value="{DynamicResource ButtonBackgroundDisabledBrush}" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ButtonBorderDisabledBrush}" />
                            <Setter TargetName="ContentPresenter" Property="TextBlock.Foreground" Value="{DynamicResource ButtonForegroundDisabledBrush}" />
                            <Setter Property="Foreground" Value="{DynamicResource ButtonForegroundDisabledBrush}" />
                            <!--  so the text in content can bind to it, sort btn in \  -->

                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

        <Style.Resources>
            <Style BasedOn="{StaticResource ToolTipEx}" TargetType="ToolTip" />
        </Style.Resources>
    </Style>


    <Style BasedOn="{StaticResource DefaultButton}" TargetType="{x:Type Button}">
        <Setter Property="OverridesDefaultStyle" Value="False" />
    </Style>
    <Style
        x:Key="IconButton"
        BasedOn="{StaticResource DefaultButton}"
        TargetType="{x:Type Button}">
        <Setter Property="OverridesDefaultStyle" Value="False" />
        <Setter Property="Background" Value="{DynamicResource IconButtonBackgroundBrush}" />
        <Setter Property="FontSize" Value="16" />
        <Setter Property="TextOptions.TextFormattingMode" Value="Display" />
    </Style>


</ResourceDictionary>