<LinearGradientBrush x:Key="NormalBrush" EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#EEE" Offset="0.0"/> <GradientStop Color="#CCC" Offset="1.0"/> </LinearGradientBrush> <LinearGradientBrush x:Key="NormalBorderBrush" EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#CCC" Offset="0.0"/> <GradientStop Color="#444" Offset="1.0"/> </LinearGradientBrush> <!-- LightBrush is used for content areas such as Menu, Tab Control background --> <LinearGradientBrush x:Key="LightBrush" EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#FFF" Offset="0.0"/> <GradientStop Color="#EEE" Offset="1.0"/> </LinearGradientBrush> <!-- MouseOverBrush is used for MouseOver in Button, Radio Button, CheckBox --> <LinearGradientBrush x:Key="MouseOverBrush" EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#FFF" Offset="0.0"/> <GradientStop Color="#AAA" Offset="1.0"/> </LinearGradientBrush> <!-- PressedBrush is used for Pressed in Button, Radio Button, CheckBox --> <LinearGradientBrush x:Key="PressedBrush" EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#BBB" Offset="0.0"/> <GradientStop Color="#EEE" Offset="0.1"/> <GradientStop Color="#EEE" Offset="0.9"/> <GradientStop Color="#FFF" Offset="1.0"/> </LinearGradientBrush> <LinearGradientBrush x:Key="PressedBorderBrush" EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#444" Offset="0.0"/> <GradientStop Color="#888" Offset="1.0"/> </LinearGradientBrush> <!-- SelectedBackgroundBrush is used for the Selected item in ListBoxItem, ComboBoxItem--> <SolidColorBrush x:Key="SelectedBackgroundBrush" Color="#DDD"/> <!-- Disabled Brushes are used for the Disabled look of each control --> <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888"/> <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE"/> <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA"/> <!-- Used for background of ScrollViewer, TreeView, ListBox, Expander, TextBox, Tab Control --> <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFF"/> <!-- DefaultedBorderBrush is used to show KeyBoardFocus --> <LinearGradientBrush x:Key="DefaultedBorderBrush" EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#777" Offset="0.0"/> <GradientStop Color="#000" Offset="1.0"/> </LinearGradientBrush> <SolidColorBrush x:Key="SolidBorderBrush" Color="#888"/> <SolidColorBrush x:Key="LightBorderBrush" Color="#AAA"/> <SolidColorBrush x:Key="LightColorBrush" Color="#DDD"/> <!-- Used for Checkmark, Radio button, TreeViewItem, Expander ToggleButton glyphs --> <SolidColorBrush x:Key="GlyphBrush" Color="#444"/> <Style x:Key="SimpleScrollBar" TargetType="{x:Type ScrollBar}"> <Setter Property="Stylus.IsFlicksEnabled" Value="false"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ScrollBar}"> <Grid x:Name="GridRoot" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Background="{TemplateBinding Background}"> <Grid.RowDefinitions> <RowDefinition MaxHeight="18"/> <RowDefinition Height="0.00001*"/> <RowDefinition MaxHeight="18"/> </Grid.RowDefinitions> <RepeatButton x:Name="DecreaseRepeat" Style="{DynamicResource SimpleRepeatButton}" Command="ScrollBar.LineUpCommand"> <Grid> <Path x:Name="DecreaseArrow" Stroke="{TemplateBinding Foreground}" StrokeThickness="1" Data="M 0 4 L 8 4 L 4 0 Z"/> </Grid> </RepeatButton> <!-- Track is a special layout container which sizes the thumb and the repeat button which do jump scrolling either side of it --> <Track Grid.Row="1" x:Name="PART_Track" Orientation="Vertical" IsDirectionReversed="true"> <Track.Thumb> <Thumb Style="{DynamicResource SimpleThumbStyle}"/> </Track.Thumb> <Track.IncreaseRepeatButton> <RepeatButton x:Name="PageUp" Style="{DynamicResource SimpleScrollRepeatButtonStyle}" Command="ScrollBar.PageDownCommand"/> </Track.IncreaseRepeatButton> <Track.DecreaseRepeatButton> <RepeatButton x:Name="PageDown" Style="{DynamicResource SimpleScrollRepeatButtonStyle}" Command="ScrollBar.PageUpCommand"/> </Track.DecreaseRepeatButton> </Track> <RepeatButton Grid.Row="2" x:Name="IncreaseRepeat" Style="{DynamicResource SimpleRepeatButton}" Command="ScrollBar.LineDownCommand"> <Grid> <Path x:Name="IncreaseArrow" Stroke="{TemplateBinding Foreground}" StrokeThickness="1" Data="M 0 0 L 4 4 L 8 0 Z"/> </Grid> </RepeatButton> </Grid> <!-- This uses a single template for ScrollBar and rotate it to be Horizontal It also changes the commands so that the it does Left and Right instead of Up and Down Commands --> <ControlTemplate.Triggers> <Trigger Property="Orientation" Value="Horizontal"> <!-- Rotate the ScrollBar from Vertical to Horizontal --> <Setter Property="LayoutTransform" TargetName="GridRoot"> <Setter.Value> <RotateTransform Angle="-90"/> </Setter.Value> </Setter> <!-- Track is bound to Orientation internally, so we need to rotate it back to Vertical --> <Setter TargetName="PART_Track" Property="Orientation" Value="Vertical"/> <!-- Change the commands to do Horizontal commands --> <Setter Property="Command" Value="ScrollBar.LineLeftCommand" TargetName="DecreaseRepeat"/> <Setter Property="Command" Value="ScrollBar.LineRightCommand" TargetName="IncreaseRepeat"/> <Setter Property="Command" Value="ScrollBar.PageLeftCommand" TargetName="PageDown"/> <Setter Property="Command" Value="ScrollBar.PageRightCommand" TargetName="PageUp"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style>