<Application x:Class="ScrollBarStyles.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <!-- RepeatButton Templates -->
        <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
            <Grid x:Name="Root" Background="Transparent"  />
        </ControlTemplate>

        <!-- Horizontal Inc/Dec Templates -->
        <ControlTemplate x:Key="HorizontalIncrementTemplate" TargetType="RepeatButton">
            <Grid x:Name="Root" >
                <Path Stretch="Uniform" Height="8" Width="4" Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z " Fill="{TemplateBinding Foreground}" />
                <Rectangle x:Name="DisabledElement" Opacity="0" RadiusX="2" RadiusY="2" Fill="#FFFFFFFF"/>
            </Grid>
        </ControlTemplate>
        <ControlTemplate x:Key="HorizontalDecrementTemplate" TargetType="RepeatButton">
            <Grid x:Name="Root">
                <Path Stretch="Uniform" Height="8" Width="4" Data="F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z " Fill="{TemplateBinding Foreground}" />
                <Rectangle x:Name="DisabledElement" Opacity="0" RadiusX="2" RadiusY="2" Fill="#FFFFFFFF"/>
            </Grid>
        </ControlTemplate>

        <!-- Vertical Inc/Dec Templates -->
        <ControlTemplate x:Key="VerticalIncrementTemplate" TargetType="RepeatButton">
            <Grid x:Name="Root">
                <Path Stretch="Uniform" Height="4" Width="8" Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z " Fill="{TemplateBinding Foreground}" />
                <Rectangle x:Name="DisabledElement" Opacity="0" RadiusX="2" RadiusY="2" Fill="#FFFFFFFF"/>
            </Grid>
        </ControlTemplate>
        <ControlTemplate x:Key="VerticalDecrementTemplate" TargetType="RepeatButton">
            <Grid x:Name="Root">
                <Path Stretch="Uniform" Height="4" Width="8" Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z " Fill="{TemplateBinding Foreground}" />
                <Rectangle x:Name="DisabledElement" Opacity="0" RadiusX="2" RadiusY="2" Fill="#FFFFFFFF"/>
            </Grid>
        </ControlTemplate>

        <!-- Thumb Templates -->
        <ControlTemplate x:Key="VerticalThumbTemplate" TargetType="Thumb">
            <Grid x:Name="ThumbVisual" Margin="4,0,4,0">
                <Rectangle x:Name="Background" RadiusX="4" RadiusY="4" Fill="{TemplateBinding Foreground}" Opacity=".7" />
            </Grid>
        </ControlTemplate>
        <ControlTemplate x:Key="HorizontalThumbTemplate" TargetType="Thumb">
            <Grid x:Name="ThumbVisual" Margin="0,4,0,4">
                <Rectangle x:Name="Background" RadiusX="4" RadiusY="4" Fill="{TemplateBinding Foreground}" Opacity=".7" />
            </Grid>
        </ControlTemplate>

        <Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                        <Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                        <Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        
    </Application.Resources>
</Application>