123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399 |
- <ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- mc:Ignorable="d">
- <SolidColorBrush x:Key="ScrollBar_BD" Color="#FF243664"/>
- <SolidColorBrush x:Key="ScrollBar_BG" Color="#FF396293"/>
- <SolidColorBrush x:Key="ScrollBar_InnerHighlight" Color="#FF9FCDED"/>
- <SolidColorBrush x:Key="ScrollBar_InnerShadow" Color="#FF003A62"/>
- <SolidColorBrush x:Key="ScrollBar_BG_MouseOver" Color="#FF227BB8"/>
- <SolidColorBrush x:Key="ScrollBar_ArrowBG" Color="White"/>
- <SolidColorBrush x:Key="ScrollBar_BD_Unable" Color="#FF868686"/>
- <LinearGradientBrush x:Key="ScrollBar_BG_Unable" EndPoint="0.5,1" StartPoint="0.5,0">
- <GradientStop Color="#FFB1B1B1" Offset="0"/>
- <GradientStop Color="#FFDADADA" Offset="1"/>
- </LinearGradientBrush>
- <SolidColorBrush x:Key="ScrollBar_InnerHighlight_Unable" Color="#FFD8D8D8"/>
- <SolidColorBrush x:Key="ScrollBar_InnerShadow_Unable" Color="#FF6C6C6C"/>
- <Style x:Key="ScrollBarLineButton" TargetType="{x:Type RepeatButton}">
- <Setter Property="SnapsToDevicePixels" Value="True"/>
- <Setter Property="OverridesDefaultStyle" Value="True"/>
- <Setter Property="BorderBrush" Value="{DynamicResource ScrollBar_BD}"/>
- <Setter Property="Background" Value="{DynamicResource ScrollBar_BG}"/>
- <Setter Property="Border.CornerRadius" Value="3"/>
- <Setter Property="Focusable" Value="false"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RepeatButton}">
- <ControlTemplate.Resources>
- <Storyboard x:Key="OnMouseOver">
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HighLight">
- <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
- <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1" KeySpline="0,0,1,0"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- <Storyboard x:Key="OnMouseOut">
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HighLight">
- <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
- <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" KeySpline="0,0,0,1"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </ControlTemplate.Resources>
- <Grid x:Name="BG" Cursor="Hand">
- <Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="{TemplateBinding Border.CornerRadius}" Background="{TemplateBinding Background}">
- <Border x:Name="InnerBD_Highlight" BorderThickness="1,1,0,0" BorderBrush="{DynamicResource ScrollBar_InnerHighlight}" CornerRadius="2">
- <Border x:Name="InnerBD_Shadow" BorderThickness="0,0,1,1" BorderBrush="{DynamicResource ScrollBar_InnerShadow}" CornerRadius="2"/>
- </Border>
- </Border>
- <Border x:Name="HighLight" Margin="2" Background="{DynamicResource ScrollBar_BG_MouseOver}" CornerRadius="2" Opacity="0"/>
- <Path x:Name="path"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}"
- Fill="{DynamicResource ScrollBar_ArrowBG}" >
- <Path.Effect>
- <DropShadowEffect BlurRadius="0" ShadowDepth="1"/>
- </Path.Effect>
- </Path>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Trigger.ExitActions>
- <BeginStoryboard x:Name="OnMouseOut_BeginStoryboard" Storyboard="{StaticResource OnMouseOut}"/>
- </Trigger.ExitActions>
- <Trigger.EnterActions>
- <BeginStoryboard Storyboard="{StaticResource OnMouseOver}"/>
- </Trigger.EnterActions>
- <Setter Property="Fill" TargetName="path" Value="#CCFFFFFF"/>
- <Setter Property="Effect" TargetName="path">
- <Setter.Value>
- <DropShadowEffect BlurRadius="0" ShadowDepth="2"/>
- </Setter.Value>
- </Setter>
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter Property="Opacity" TargetName="HighLight" Value="1"/>
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Background" TargetName="OuterBorder" Value="{DynamicResource ScrollBar_BG_Unable}"/>
- <Setter Property="BorderBrush" TargetName="InnerBD_Highlight" Value="{DynamicResource ScrollBar_InnerHighlight_Unable}"/>
- <Setter Property="BorderBrush" TargetName="OuterBorder" Value="{DynamicResource ScrollBar_BD_Unable}"/>
- <Setter Property="BorderBrush" TargetName="InnerBD_Shadow" Value="{DynamicResource ScrollBar_InnerShadow_Unable}"/>
- <Setter Property="Fill" TargetName="path" Value="#FF999999"/>
- <Setter Property="Effect" TargetName="path">
- <Setter.Value>
- <DropShadowEffect BlurRadius="0" Opacity="0" ShadowDepth="1"/>
- </Setter.Value>
- </Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <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>
- <Style x:Key="ScrollBarVerticalThumb" TargetType="{x:Type Thumb}">
- <Setter Property="SnapsToDevicePixels" Value="True"/>
- <Setter Property="OverridesDefaultStyle" Value="true"/>
- <Setter Property="IsTabStop" Value="False"/>
- <Setter Property="Focusable" Value="False"/>
- <Setter Property="BorderBrush" Value="{DynamicResource ScrollBar_BD}"/>
- <Setter Property="Background" Value="{DynamicResource ScrollBar_BG}"/>
- <Setter Property="Border.CornerRadius" Value="0"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Thumb}">
- <ControlTemplate.Resources>
- <Storyboard x:Key="OnMouseOver">
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HighLight">
- <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
- <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1" KeySpline="0,0,1,0"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- <Storyboard x:Key="OnMouseOut">
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HighLight">
- <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
- <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" KeySpline="0,0,0,1"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </ControlTemplate.Resources>
- <Grid x:Name="BG" Cursor="Hand">
- <Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="{TemplateBinding Border.CornerRadius}" Background="{TemplateBinding Background}">
- <Border x:Name="InnerBD_Highlight" BorderThickness="1,1,0,0" BorderBrush="{DynamicResource ScrollBar_InnerHighlight}">
- <Border x:Name="InnerBD_Shadow" BorderThickness="0,0,1,1" BorderBrush="{DynamicResource ScrollBar_InnerShadow}"/>
- </Border>
- </Border>
- <Border x:Name="HighLight" Margin="2" Background="{DynamicResource ScrollBar_BG_MouseOver}" Opacity="0" CornerRadius="2"/>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Trigger.ExitActions>
- <BeginStoryboard x:Name="OnMouseOut_BeginStoryboard" Storyboard="{StaticResource OnMouseOut}"/>
- </Trigger.ExitActions>
- <Trigger.EnterActions>
- <BeginStoryboard Storyboard="{StaticResource OnMouseOver}"/>
- </Trigger.EnterActions>
- </Trigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Background" TargetName="OuterBorder" Value="{DynamicResource ScrollBar_BG_Unable}"/>
- <Setter Property="BorderBrush" TargetName="InnerBD_Highlight" Value="{DynamicResource ScrollBar_InnerHighlight_Unable}"/>
- <Setter Property="BorderBrush" TargetName="OuterBorder" Value="{DynamicResource ScrollBar_BD_Unable}"/>
- <Setter Property="BorderBrush" TargetName="InnerBD_Shadow" Value="{DynamicResource ScrollBar_InnerShadow_Unable}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="ScrollBarHorizontalThumb" TargetType="{x:Type Thumb}">
- <Setter Property="SnapsToDevicePixels" Value="True"/>
- <Setter Property="OverridesDefaultStyle" Value="true"/>
- <Setter Property="IsTabStop" Value="False"/>
- <Setter Property="Focusable" Value="False"/>
- <Setter Property="BorderBrush" Value="{DynamicResource ScrollBar_BD}"/>
- <Setter Property="Background" Value="{DynamicResource ScrollBar_BG}"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Thumb}">
- <ControlTemplate.Resources>
- <Storyboard x:Key="OnMouseOver">
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HighLight">
- <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
- <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1" KeySpline="0,0,1,0"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- <Storyboard x:Key="OnMouseOut">
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HighLight">
- <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
- <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" KeySpline="0,0,0,1"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </ControlTemplate.Resources>
- <Grid x:Name="BG" Cursor="Hand">
- <Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="{TemplateBinding Border.CornerRadius}" Background="{TemplateBinding Background}">
- <Border x:Name="InnerBD_Highlight" BorderThickness="1,1,0,0" BorderBrush="{DynamicResource ScrollBar_InnerHighlight}">
- <Border x:Name="InnerBD_Shadow" BorderThickness="0,0,1,1" BorderBrush="{DynamicResource ScrollBar_InnerShadow}"/>
- </Border>
- </Border>
- <Border x:Name="HighLight" Margin="1" Background="{DynamicResource ScrollBar_BG_MouseOver}" Opacity="0"/>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Trigger.ExitActions>
- <BeginStoryboard x:Name="OnMouseOut_BeginStoryboard" Storyboard="{StaticResource OnMouseOut}"/>
- </Trigger.ExitActions>
- <Trigger.EnterActions>
- <BeginStoryboard Storyboard="{StaticResource OnMouseOver}"/>
- </Trigger.EnterActions>
- </Trigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Background" TargetName="OuterBorder" Value="{DynamicResource ScrollBar_BG_Unable}"/>
- <Setter Property="BorderBrush" TargetName="InnerBD_Highlight" Value="{DynamicResource ScrollBar_InnerHighlight_Unable}"/>
- <Setter Property="BorderBrush" TargetName="OuterBorder" Value="{DynamicResource ScrollBar_BD_Unable}"/>
- <Setter Property="BorderBrush" TargetName="InnerBD_Shadow" Value="{DynamicResource ScrollBar_InnerShadow_Unable}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
- <Grid >
- <Grid.RowDefinitions>
- <RowDefinition MaxHeight="22"/>
- <RowDefinition Height="0.00001*"/>
- <RowDefinition MaxHeight="22"/>
- </Grid.RowDefinitions>
- <RepeatButton
- Grid.Row="0"
- Style="{StaticResource ScrollBarLineButton}"
- Height="21"
- Command="ScrollBar.LineUpCommand"
- Content="M 0 4 L 8 4 L 4 0 Z" VerticalAlignment="Top" />
- <Track
- Name="PART_Track"
- Grid.Row="1"
- Height="{TemplateBinding Height}"
- Maximum="{TemplateBinding Maximum}"
- Minimum="{TemplateBinding Minimum}"
- Value="{TemplateBinding Value}"
- IsDirectionReversed="true">
- <Track.DecreaseRepeatButton>
- <RepeatButton
- Style="{StaticResource VerticalScrollBarPageButton}"
- Command="ScrollBar.PageUpCommand" />
- </Track.DecreaseRepeatButton>
- <Track.Thumb>
- <Thumb Style="{StaticResource ScrollBarVerticalThumb}" />
- </Track.Thumb>
- <Track.IncreaseRepeatButton>
- <RepeatButton
- Style="{StaticResource VerticalScrollBarPageButton}"
- Command="ScrollBar.PageDownCommand" />
- </Track.IncreaseRepeatButton>
- </Track>
- <RepeatButton Grid.Row="3"
- Style="{StaticResource ScrollBarLineButton}"
- Height="21"
- Command="ScrollBar.LineDownCommand"
- Content="M 0 0 L 4 4 L 8 0 Z" VerticalAlignment="Bottom"/>
- </Grid>
- </ControlTemplate>
- <ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
- <Grid >
- <Grid.ColumnDefinitions>
- <ColumnDefinition MaxWidth="22"/>
- <ColumnDefinition Width="0.00001*"/>
- <ColumnDefinition MaxWidth="22"/>
- </Grid.ColumnDefinitions>
- <RepeatButton
- Grid.Column="0"
- Style="{StaticResource ScrollBarLineButton}"
- Width="21" Command="ScrollBar.LineLeftCommand"
- Content="M 4 0 L 4 8 L 0 4 Z" HorizontalAlignment="Left" />
- <Track
- Name="PART_Track"
- Grid.Column="1"
- Width="{TemplateBinding Width}"
- Maximum="{TemplateBinding Maximum}"
- Minimum="{TemplateBinding Minimum}"
- Value="{TemplateBinding Value}"
- IsDirectionReversed="False">
- <Track.DecreaseRepeatButton>
- <RepeatButton
- Style="{StaticResource HorizontalScrollBarPageButton}"
- Command="ScrollBar.PageLeftCommand" />
- </Track.DecreaseRepeatButton>
- <Track.Thumb>
- <Thumb Style="{StaticResource ScrollBarHorizontalThumb}"/>
- </Track.Thumb>
- <Track.IncreaseRepeatButton>
- <RepeatButton
- Style="{StaticResource HorizontalScrollBarPageButton}"
- Command="ScrollBar.PageRightCommand" />
- </Track.IncreaseRepeatButton>
- </Track>
- <RepeatButton
- Grid.Column="3"
- Style="{StaticResource ScrollBarLineButton}"
- Width="21"
- Command="ScrollBar.LineRightCommand"
- Content="M 0 0 L 4 4 L 0 8 Z" HorizontalAlignment="Right"/>
- </Grid>
- </ControlTemplate>
- <Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
- <Setter Property="SnapsToDevicePixels" Value="True"/>
- <Setter Property="OverridesDefaultStyle" Value="true"/>
- <Style.Triggers>
- <Trigger Property="Orientation" Value="Horizontal">
- <Setter Property="Width" Value="Auto"/>
- <Setter Property="Height" Value="20" />
- <Setter Property="Margin" Value="0,1"/>
- <Setter Property="Template" Value="{StaticResource HorizontalScrollBar}" />
- </Trigger>
- <Trigger Property="Orientation" Value="Vertical">
- <Setter Property="Width" Value="20"/>
- <Setter Property="Height" Value="Auto" />
- <Setter Property="Margin" Value="1,0"/>
- <Setter Property="Template" Value="{StaticResource VerticalScrollBar}" />
- </Trigger>
- </Style.Triggers>
- </Style>
- <Style TargetType="{x:Type ScrollViewer}">
- <Setter Property="OverridesDefaultStyle" Value="True"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ScrollViewer}">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Rectangle
- x:Name="Corner"
- Grid.Column="1"
- Fill="{x:Null}"
- Grid.Row="1"/>
- <ScrollContentPresenter
- x:Name="PART_ScrollContentPresenter"
- CanContentScroll="{TemplateBinding CanContentScroll}"
- CanHorizontallyScroll="False"
- CanVerticallyScroll="False"
- ContentTemplate="{TemplateBinding ContentTemplate}"
- Content="{TemplateBinding Content}"
- Grid.Column="0"
- Margin="{TemplateBinding Padding}"
- Grid.Row="0"/>
- <ScrollBar
- x:Name="PART_VerticalScrollBar"
- AutomationProperties.AutomationId="VerticalScrollBar"
- Cursor="Arrow"
- Grid.Column="1"
- Maximum="{TemplateBinding ScrollableHeight}"
- Minimum="0"
- Grid.Row="0"
- Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
- Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
- ViewportSize="{TemplateBinding ViewportHeight}"/>
- <ScrollBar
- x:Name="PART_HorizontalScrollBar"
- AutomationProperties.AutomationId="HorizontalScrollBar"
- Cursor="Arrow"
- Grid.Column="0"
- Maximum="{TemplateBinding ScrollableWidth}"
- Minimum="0"
- Orientation="Horizontal"
- Grid.Row="1"
- Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
- Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
- ViewportSize="{TemplateBinding ViewportWidth}"/>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|