|
@@ -5,20 +5,28 @@
|
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
<!--滚动条两头的按钮-->
|
|
<!--滚动条两头的按钮-->
|
|
|
<Style x:Key="ScrollBarButton" TargetType="{x:Type RepeatButton}">
|
|
<Style x:Key="ScrollBarButton" TargetType="{x:Type RepeatButton}">
|
|
|
- <Setter Property="Background" Value="Transparent"></Setter>
|
|
|
|
|
- <Setter Property="Foreground" Value="Gray"></Setter>
|
|
|
|
|
- <Setter Property="VerticalAlignment" Value="Center"></Setter>
|
|
|
|
|
|
|
+ <Setter Property="Background" Value="Transparent"/>
|
|
|
|
|
+ <Setter Property="Foreground" Value="Gray"/>
|
|
|
|
|
+ <Setter Property="VerticalAlignment" Value="Center"/>
|
|
|
|
|
+ <Setter Property="HorizontalAlignment" Value="Center"/>
|
|
|
|
|
+ <Setter Property="Width" Value="20"/>
|
|
|
|
|
+ <Setter Property="Height" Value="20"/>
|
|
|
<Setter Property="Template">
|
|
<Setter Property="Template">
|
|
|
<Setter.Value>
|
|
<Setter.Value>
|
|
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
|
|
- <Border>
|
|
|
|
|
- <Path x:Name="btnIcon" Data="{TemplateBinding Content}"
|
|
|
|
|
|
|
+ <Border Background="{TemplateBinding Background}">
|
|
|
|
|
+ <Path x:Name="btnIcon"
|
|
|
|
|
+ Data="{TemplateBinding Content}"
|
|
|
Fill="{TemplateBinding Foreground}"
|
|
Fill="{TemplateBinding Foreground}"
|
|
|
- Width="25" Height="15" Stretch="Uniform"/>
|
|
|
|
|
|
|
+ Width="{TemplateBinding Width}"
|
|
|
|
|
+ Height="{TemplateBinding Height}"
|
|
|
|
|
+ Stretch="Uniform"
|
|
|
|
|
+ HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
|
|
|
|
+ VerticalAlignment="{TemplateBinding VerticalAlignment}"/>
|
|
|
</Border>
|
|
</Border>
|
|
|
<ControlTemplate.Triggers>
|
|
<ControlTemplate.Triggers>
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
- <Setter Property="Fill" Value="Red" TargetName="btnIcon"></Setter>
|
|
|
|
|
|
|
+ <Setter Property="Fill" Value="{DynamicResource Brush.ButtonHover}" TargetName="btnIcon"></Setter>
|
|
|
</Trigger>
|
|
</Trigger>
|
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
|
<Setter Property="Opacity" Value="0.5" TargetName="btnIcon"/>
|
|
<Setter Property="Opacity" Value="0.5" TargetName="btnIcon"/>
|
|
@@ -30,29 +38,29 @@
|
|
|
</Style>
|
|
</Style>
|
|
|
<!--滚动条滑块两边按钮样式-->
|
|
<!--滚动条滑块两边按钮样式-->
|
|
|
<Style x:Key="ScrollBarTrackButton" TargetType="{x:Type RepeatButton}">
|
|
<Style x:Key="ScrollBarTrackButton" TargetType="{x:Type RepeatButton}">
|
|
|
- <Setter Property="Background" Value="#CCCCCC"></Setter>
|
|
|
|
|
|
|
+ <Setter Property="Background" Value="#CCCCCC"/>
|
|
|
<Setter Property="Template">
|
|
<Setter Property="Template">
|
|
|
<Setter.Value>
|
|
<Setter.Value>
|
|
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
|
|
- <Border Background="{TemplateBinding Background}"></Border>
|
|
|
|
|
|
|
+ <Border Background="{TemplateBinding Background}"/>
|
|
|
</ControlTemplate>
|
|
</ControlTemplate>
|
|
|
</Setter.Value>
|
|
</Setter.Value>
|
|
|
</Setter>
|
|
</Setter>
|
|
|
</Style>
|
|
</Style>
|
|
|
<!--滚动条滑块样式-->
|
|
<!--滚动条滑块样式-->
|
|
|
- <ControlTemplate x:Key="ThumbTemplate" TargetType="Thumb">
|
|
|
|
|
- <Border x:Name="sliderBar" CornerRadius="3"
|
|
|
|
|
- Margin="2" SnapsToDevicePixels="True"
|
|
|
|
|
- Background="#505050"/>
|
|
|
|
|
|
|
+ <ControlTemplate x:Key="ThumbTemplate" TargetType="{x:Type Thumb}">
|
|
|
|
|
+ <Border x:Name="sliderBar" CornerRadius="8"
|
|
|
|
|
+ SnapsToDevicePixels="True"
|
|
|
|
|
+ Background="#505050"/>
|
|
|
<ControlTemplate.Triggers>
|
|
<ControlTemplate.Triggers>
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
- <Setter Property="Background" Value="#8E8E93" TargetName="sliderBar"></Setter>
|
|
|
|
|
|
|
+ <Setter Property="Background" Value="#8E8E93" TargetName="sliderBar"/>
|
|
|
</Trigger>
|
|
</Trigger>
|
|
|
<Trigger Property="IsMouseOver" Value="False">
|
|
<Trigger Property="IsMouseOver" Value="False">
|
|
|
- <Setter Property="Background" Value="#505050" TargetName="sliderBar"></Setter>
|
|
|
|
|
|
|
+ <Setter Property="Background" Value="#505050" TargetName="sliderBar"/>
|
|
|
</Trigger>
|
|
</Trigger>
|
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
|
- <Setter Property="Opacity" Value="0.5" TargetName="sliderBar"></Setter>
|
|
|
|
|
|
|
+ <Setter Property="Opacity" Value="0.5" TargetName="sliderBar"/>
|
|
|
</Trigger>
|
|
</Trigger>
|
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate.Triggers>
|
|
|
</ControlTemplate>
|
|
</ControlTemplate>
|
|
@@ -70,11 +78,10 @@
|
|
|
<!--左按钮-->
|
|
<!--左按钮-->
|
|
|
<Border Grid.Column="0">
|
|
<Border Grid.Column="0">
|
|
|
<RepeatButton x:Name="HorizontalSmallDecrease"
|
|
<RepeatButton x:Name="HorizontalSmallDecrease"
|
|
|
- Content="{DynamicResource Icon.ArrowLeftRight}"
|
|
|
|
|
|
|
+ Content="{DynamicResource Icon.ArrowLeft}"
|
|
|
Style="{StaticResource ScrollBarButton}"
|
|
Style="{StaticResource ScrollBarButton}"
|
|
|
- IsTabStop="False" Interval="50"
|
|
|
|
|
- Width="15" Height="15"
|
|
|
|
|
- Margin="0,1,0,0" Command="ScrollBar.LineLeftCommand"/>
|
|
|
|
|
|
|
+ IsTabStop="False" Interval="50"
|
|
|
|
|
+ Command="ScrollBar.LineLeftCommand"/>
|
|
|
</Border>
|
|
</Border>
|
|
|
<!--中间滑动区域-->
|
|
<!--中间滑动区域-->
|
|
|
<Track x:Name="PART_Track" IsDirectionReversed="False" Grid.Column="1">
|
|
<Track x:Name="PART_Track" IsDirectionReversed="False" Grid.Column="1">
|
|
@@ -94,8 +101,7 @@
|
|
|
</Track.IncreaseRepeatButton>
|
|
</Track.IncreaseRepeatButton>
|
|
|
</Track>
|
|
</Track>
|
|
|
<!--右按钮-->
|
|
<!--右按钮-->
|
|
|
- <Border Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center"
|
|
|
|
|
- Background="#AAAAAA">
|
|
|
|
|
|
|
+ <Border Grid.Column="2">
|
|
|
<RepeatButton Content="{DynamicResource Icon.ArrowRight}"
|
|
<RepeatButton Content="{DynamicResource Icon.ArrowRight}"
|
|
|
Style="{StaticResource ScrollBarButton}"
|
|
Style="{StaticResource ScrollBarButton}"
|
|
|
IsTabStop="False" Interval="50"
|
|
IsTabStop="False" Interval="50"
|
|
@@ -117,13 +123,13 @@
|
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
|
</Grid.RowDefinitions>
|
|
</Grid.RowDefinitions>
|
|
|
<!--内部背景-->
|
|
<!--内部背景-->
|
|
|
- <Border x:Name="BgInner" Grid.Row="1" Margin="0" CornerRadius="6" SnapsToDevicePixels ="True"
|
|
|
|
|
|
|
+ <Border x:Name="BgInner" Grid.Row="1" CornerRadius="6" SnapsToDevicePixels ="True"
|
|
|
Background="#CCCCCC"/>
|
|
Background="#CCCCCC"/>
|
|
|
<!--上按钮-->
|
|
<!--上按钮-->
|
|
|
- <Border Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="VerticalSmallDecrease">
|
|
|
|
|
- <RepeatButton Content="{DynamicResource arrowUp}"
|
|
|
|
|
|
|
+ <Border Grid.Row="0" x:Name="VerticalSmallDecrease" Background="Transparent">
|
|
|
|
|
+ <RepeatButton Content="{DynamicResource Icon.ArrowUp}"
|
|
|
Style="{StaticResource ScrollBarButton}"
|
|
Style="{StaticResource ScrollBarButton}"
|
|
|
- IsTabStop="False" Interval="50" Margin="0"
|
|
|
|
|
|
|
+ IsTabStop="False" Interval="50"
|
|
|
Command="ScrollBar.LineUpCommand"/>
|
|
Command="ScrollBar.LineUpCommand"/>
|
|
|
</Border>
|
|
</Border>
|
|
|
<!--中间滑动区域-->
|
|
<!--中间滑动区域-->
|
|
@@ -141,15 +147,18 @@
|
|
|
</Track.Thumb>
|
|
</Track.Thumb>
|
|
|
<!--下滑块-->
|
|
<!--下滑块-->
|
|
|
<Track.IncreaseRepeatButton>
|
|
<Track.IncreaseRepeatButton>
|
|
|
- <RepeatButton x:Name="HorizontalLargeIncrease" Command="ScrollBar.PageDownCommand"
|
|
|
|
|
- IsTabStop="False" Interval="50" Style="{StaticResource ScrollBarTrackButton}" />
|
|
|
|
|
|
|
+ <RepeatButton x:Name="HorizontalLargeIncrease"
|
|
|
|
|
+ Command="ScrollBar.PageDownCommand"
|
|
|
|
|
+ IsTabStop="False"
|
|
|
|
|
+ Interval="50"
|
|
|
|
|
+ Style="{StaticResource ScrollBarTrackButton}"/>
|
|
|
</Track.IncreaseRepeatButton>
|
|
</Track.IncreaseRepeatButton>
|
|
|
</Track>
|
|
</Track>
|
|
|
<!--下按钮-->
|
|
<!--下按钮-->
|
|
|
- <Border Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="VerticalSmallIncrease">
|
|
|
|
|
- <RepeatButton Content="{DynamicResource arrowDown}"
|
|
|
|
|
|
|
+ <Border Grid.Row="2" x:Name="VerticalSmallIncrease">
|
|
|
|
|
+ <RepeatButton Content="{DynamicResource Icon.ArrowDown}"
|
|
|
Style="{StaticResource ScrollBarButton}"
|
|
Style="{StaticResource ScrollBarButton}"
|
|
|
- IsTabStop="False" Interval="50" Margin="0"
|
|
|
|
|
|
|
+ IsTabStop="False" Interval="50"
|
|
|
Command="ScrollBar.LineDownCommand"/>
|
|
Command="ScrollBar.LineDownCommand"/>
|
|
|
</Border>
|
|
</Border>
|
|
|
</Grid>
|
|
</Grid>
|