| <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| xmlns:sys="clr-namespace:System;assembly=mscorlib"> |
| xmlns:sys="clr-namespace:System;assembly=mscorlib"> |
| |
| |
| <Style x:Key="ScrollBarTrackButton" TargetType="{x:Type RepeatButton}"> |
| <Style x:Key="ScrollBarTrackButton" TargetType="{x:Type RepeatButton}"> |
| <Setter Property="SnapsToDevicePixels" Value="True" /> |
| <Setter Property="SnapsToDevicePixels" Value="True" /> |
| <Setter Property="OverridesDefaultStyle" Value="true" /> |
| <Setter Property="OverridesDefaultStyle" Value="true" /> |
| <Setter Property="IsTabStop" Value="False" /> |
| <Setter Property="IsTabStop" Value="False" /> |
| <Setter Property="Focusable" Value="False" /> |
| <Setter Property="Focusable" Value="False" /> |
| <Setter Property="Template"> |
| <Setter Property="Template"> |
| <Setter.Value> |
| <Setter.Value> |
| <ControlTemplate TargetType="{x:Type RepeatButton}"> |
| <ControlTemplate TargetType="{x:Type RepeatButton}"> |
| <Border Background="Transparent" /> |
| <Border Background="Transparent" /> |
| </ControlTemplate> |
| </ControlTemplate> |
| </Setter.Value> |
| </Setter.Value> |
| </Setter> |
| </Setter> |
| </Style> |
| </Style> |
| |
| |
| <Style TargetType="{x:Type Thumb}"> |
| <Style TargetType="{x:Type Thumb}"> |
. | <Setter Property="Background" Value="{StaticResource ControlBackgroundBrush}" /> |
| <Setter Property="Background" Value="{DynamicResource ControlBackgroundBrush}" /> |
| <Setter Property="Template"> |
| <Setter Property="Template"> |
| <Setter.Value> |
| <Setter.Value> |
| <ControlTemplate TargetType="{x:Type Thumb}"> |
| <ControlTemplate TargetType="{x:Type Thumb}"> |
| <Rectangle x:Name="HoverRectangle" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" |
| <Rectangle x:Name="HoverRectangle" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" |
| Width="Auto" Height="Auto" Stroke="{x:Null}" |
| Width="Auto" Height="Auto" Stroke="{x:Null}" |
| Margin="4.5,1,4.5,1" MinHeight="20" |
| Margin="4.5,1,4.5,1" MinHeight="20" |
| Fill="{TemplateBinding Background}" /> |
| Fill="{TemplateBinding Background}" /> |
| <ControlTemplate.Triggers> |
| <ControlTemplate.Triggers> |
. | <Trigger Property="IsFocused" Value="True" /> |
| |
| <Trigger Property="IsMouseOver" Value="True"> |
| <Trigger Property="IsMouseOver" Value="True"> |
| <Setter Property="Fill" Value="{DynamicResource GlyphBrush}" TargetName="HoverRectangle" /> |
| <Setter Property="Fill" Value="{DynamicResource GlyphBrush}" TargetName="HoverRectangle" /> |
| </Trigger> |
| </Trigger> |
| </ControlTemplate.Triggers> |
| </ControlTemplate.Triggers> |
| </ControlTemplate> |
| </ControlTemplate> |
| </Setter.Value> |
| </Setter.Value> |
| </Setter> |
| </Setter> |
| </Style> |
| </Style> |
| |
| |
| <Style TargetType="{x:Type ScrollBar}"> |
| <Style TargetType="{x:Type ScrollBar}"> |
| <Setter Property="Stylus.IsFlicksEnabled" Value="False" /> |
| <Setter Property="Stylus.IsFlicksEnabled" Value="False" /> |
. | <Setter Property="Background" Value="{DynamicResource ControlBackgroundBrush}" /> |
| <Setter Property="Background" Value="{DynamicResource ControlBackgroundBrush}" /> |
| <Setter Property="Template"> |
| <Setter Property="Template"> |
| <Setter.Value> |
| <Setter.Value> |
| <ControlTemplate TargetType="{x:Type ScrollBar}"> |
| <ControlTemplate TargetType="{x:Type ScrollBar}"> |
| <Track x:Name="PART_Track" Orientation="Vertical" IsDirectionReversed="True" |
| <Track x:Name="PART_Track" Orientation="Vertical" IsDirectionReversed="True" |
| Width="17"> |
| Width="17"> |
| <Track.Resources> |
| <Track.Resources> |
| <sys:Double x:Key="{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}">42</sys:Double> |
| <sys:Double x:Key="{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}">42</sys:Double> |
| </Track.Resources> |
| </Track.Resources> |
| <Track.Thumb> |
| <Track.Thumb> |
. | <Thumb Width="60" /> |
| <Thumb Width="60" Background="{TemplateBinding ScrollViewer.Background}" /> |
| </Track.Thumb> |
| </Track.Thumb> |
| <Track.DecreaseRepeatButton> |
| <Track.DecreaseRepeatButton> |
| <RepeatButton Style="{DynamicResource ScrollBarTrackButton}" |
| <RepeatButton Style="{DynamicResource ScrollBarTrackButton}" |
| Command="ScrollBar.PageUpCommand" /> |
| Command="ScrollBar.PageUpCommand" /> |
| </Track.DecreaseRepeatButton> |
| </Track.DecreaseRepeatButton> |
| <Track.IncreaseRepeatButton> |
| <Track.IncreaseRepeatButton> |
| <RepeatButton Style="{DynamicResource ScrollBarTrackButton}" |
| <RepeatButton Style="{DynamicResource ScrollBarTrackButton}" |
| Command="ScrollBar.PageDownCommand" /> |
| Command="ScrollBar.PageDownCommand" /> |
| </Track.IncreaseRepeatButton> |
| </Track.IncreaseRepeatButton> |
| </Track> |
| </Track> |
| <ControlTemplate.Triggers> |
| <ControlTemplate.Triggers> |
| <Trigger Property="Orientation" Value="Horizontal"> |
| <Trigger Property="Orientation" Value="Horizontal"> |
| <Setter Property="LayoutTransform" TargetName="PART_Track"> |
| <Setter Property="LayoutTransform" TargetName="PART_Track"> |
| <Setter.Value> |
| <Setter.Value> |
| <RotateTransform Angle="-90" /> |
| <RotateTransform Angle="-90" /> |
| </Setter.Value> |
| </Setter.Value> |
| </Setter> |
| </Setter> |
| <Setter TargetName="PART_Track" Property="Orientation" Value="Vertical" /> |
| <Setter TargetName="PART_Track" Property="Orientation" Value="Vertical" /> |
| </Trigger> |
| </Trigger> |
| </ControlTemplate.Triggers> |
| </ControlTemplate.Triggers> |
| </ControlTemplate> |
| </ControlTemplate> |
| </Setter.Value> |
| </Setter.Value> |
| </Setter> |
| </Setter> |
| </Style> |
| </Style> |
| |
| |
. | <Style TargetType="ScrollViewerEx" BasedOn="{StaticResource {x:Type ScrollViewer}}"> |
| <Style TargetType="ScrollViewer"> |
| |
| <Setter Property="Template"> |
| |
| <Setter.Value> |
| |
| <ControlTemplate TargetType="{x:Type ScrollViewer}"> |
| |
| <Grid> |
| |
| <Grid.ColumnDefinitions> |
| |
| <ColumnDefinition Width="*"/> |
| |
| <ColumnDefinition Width="Auto"/> |
| |
| </Grid.ColumnDefinitions> |
| |
| <Grid.RowDefinitions> |
| |
| <RowDefinition Height="*"/> |
| |
| <RowDefinition Height="Auto"/> |
| |
| </Grid.RowDefinitions> |
| |
| <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Column="0" |
| |
| CanContentScroll="{TemplateBinding CanContentScroll}" |
| |
| CanHorizontallyScroll="False" CanVerticallyScroll="False" |
| |
| ContentTemplate="{TemplateBinding ContentTemplate}" |
| |
| Content="{TemplateBinding Content}" /> |
| |
| <ScrollBar x:Name="PART_VerticalScrollBar" |
| |
| Grid.Column="1" Grid.Row="0" |
| |
| Value="{TemplateBinding VerticalOffset}" |
| |
| Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" |
| |
| ViewportSize="{TemplateBinding ViewportHeight}" |
| |
| Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/> |
| |
| <ScrollBar x:Name="PART_HorizontalScrollBar" |
| |
| Orientation="Horizontal" |
| |
| Grid.Row="1" Grid.Column="0" |
| |
| Value="{TemplateBinding HorizontalOffset}" |
| |
| Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" |
| |
| ViewportSize="{TemplateBinding ViewportWidth}" |
| |
| Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/> |
| |
| </Grid> |
| |
| <ControlTemplate.Triggers> |
| |
| <Trigger Property="IsKeyboardFocusWithin" Value="True"> |
| |
| <Setter Property="Background" Value="{DynamicResource GlyphBrush}" TargetName="PART_VerticalScrollBar" /> |
| |
| <Setter Property="Background" Value="{DynamicResource GlyphBrush}" TargetName="PART_HorizontalScrollBar" /> |
| |
| </Trigger> |
| |
| </ControlTemplate.Triggers> |
| |
| </ControlTemplate> |
| |
| </Setter.Value> |
| |
| </Setter> |
| </Style> |
| </Style> |
. | |
| |
| |
| <Style TargetType="ScrollViewerEx" BasedOn="{StaticResource {x:Type ScrollViewer}}" /> |
| </ResourceDictionary> |
| </ResourceDictionary> |