2 changed files with 252 additions and 271 deletions
@ -1,302 +1,283 @@ |
|||||
<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
<ResourceDictionary xmlns="https://github.com/avaloniaui" |
||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
||||
<Style Selector="ScrollBar"> |
<Design.PreviewWith> |
||||
<Setter Property="MinWidth" Value="{DynamicResource ScrollBarSize}" /> |
<Border Padding="20"> |
||||
<Setter Property="MinHeight" Value="{DynamicResource ScrollBarSize}" /> |
<StackPanel Orientation="Horizontal" Spacing="20"> |
||||
<Setter Property="Background" Value="{DynamicResource ScrollBarBackground}" /> |
<StackPanel Spacing="20"> |
||||
<Setter Property="Foreground" Value="{DynamicResource ScrollBarForeground}" /> |
<ScrollBar Orientation="Horizontal" AllowAutoHide="False" VerticalAlignment="Center" Width="100"/> |
||||
<Setter Property="BorderBrush" Value="{DynamicResource ScrollBarBorderBrush}" /> |
<ScrollBar Orientation="Horizontal" AllowAutoHide="False" VerticalAlignment="Center" Width="100" IsEnabled="False"/> |
||||
</Style> |
<ScrollBar Orientation="Horizontal" AllowAutoHide="True" VerticalAlignment="Center" Width="100"/> |
||||
|
<ScrollBar Orientation="Horizontal" AllowAutoHide="True" VerticalAlignment="Center" Width="100" IsEnabled="False"/> |
||||
<Style Selector="ScrollBar:vertical"> |
</StackPanel> |
||||
<Setter Property="Template"> |
<ScrollBar Orientation="Vertical" AllowAutoHide="False" HorizontalAlignment="Center" Height="100"/> |
||||
<ControlTemplate> |
<ScrollBar Orientation="Vertical" AllowAutoHide="False" HorizontalAlignment="Center" Height="100" IsEnabled="False"/> |
||||
<Grid x:Name="Root"> |
<ScrollBar Orientation="Vertical" AllowAutoHide="True" HorizontalAlignment="Center" Height="100"/> |
||||
|
<ScrollBar Orientation="Vertical" AllowAutoHide="True" HorizontalAlignment="Center" Height="100" IsEnabled="False"/> |
||||
<Border x:Name="VerticalRoot" |
</StackPanel> |
||||
Background="{TemplateBinding Background}" |
</Border> |
||||
BorderBrush="{TemplateBinding BorderBrush}"> |
</Design.PreviewWith> |
||||
<Grid RowDefinitions="Auto,*,Auto"> |
|
||||
|
<ControlTheme x:Key="FluentScrollBarThumb" TargetType="Thumb"> |
||||
<Rectangle x:Name="TrackRect" Grid.RowSpan="3" Margin="0" /> |
<Setter Property="Background" Value="{DynamicResource ScrollBarPanningThumbBackground}"/> |
||||
|
|
||||
<RepeatButton Name="PART_LineUpButton" |
|
||||
HorizontalAlignment="Center" |
|
||||
Classes="line up" |
|
||||
Grid.Row="0" |
|
||||
Focusable="False" |
|
||||
MinWidth="{DynamicResource ScrollBarSize}" |
|
||||
Height="{DynamicResource ScrollBarSize}" /> |
|
||||
|
|
||||
<Track Grid.Row="1" |
|
||||
Minimum="{TemplateBinding Minimum}" |
|
||||
Maximum="{TemplateBinding Maximum}" |
|
||||
Value="{TemplateBinding Value, Mode=TwoWay}" |
|
||||
ViewportSize="{TemplateBinding ViewportSize}" |
|
||||
Orientation="{TemplateBinding Orientation}" |
|
||||
IsDirectionReversed="True"> |
|
||||
<Track.DecreaseButton> |
|
||||
<RepeatButton Name="PART_PageUpButton" |
|
||||
Classes="largeIncrease" |
|
||||
Focusable="False" /> |
|
||||
</Track.DecreaseButton> |
|
||||
<Track.IncreaseButton> |
|
||||
<RepeatButton Name="PART_PageDownButton" |
|
||||
Classes="largeIncrease" |
|
||||
Focusable="False" /> |
|
||||
</Track.IncreaseButton> |
|
||||
<Thumb Classes="thumb" |
|
||||
Opacity="1" |
|
||||
Width="{DynamicResource ScrollBarSize}" |
|
||||
MinHeight="{DynamicResource ScrollBarSize}" |
|
||||
RenderTransformOrigin="100%,50%" /> |
|
||||
</Track> |
|
||||
|
|
||||
<RepeatButton Name="PART_LineDownButton" |
|
||||
HorizontalAlignment="Center" |
|
||||
Classes="line down" |
|
||||
Grid.Row="2" |
|
||||
Focusable="False" |
|
||||
MinWidth="{DynamicResource ScrollBarSize}" |
|
||||
Height="{DynamicResource ScrollBarSize}" /> |
|
||||
|
|
||||
</Grid> |
|
||||
</Border> |
|
||||
|
|
||||
</Grid> |
|
||||
</ControlTemplate> |
|
||||
</Setter> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar:horizontal"> |
|
||||
<Setter Property="Template"> |
|
||||
<ControlTemplate> |
|
||||
<Grid x:Name="Root"> |
|
||||
|
|
||||
<Border x:Name="HorizontalRoot" |
|
||||
Background="{TemplateBinding Background}" |
|
||||
BorderBrush="{TemplateBinding BorderBrush}"> |
|
||||
<Grid ColumnDefinitions="Auto,*,Auto"> |
|
||||
|
|
||||
<Rectangle x:Name="TrackRect" Grid.ColumnSpan="3" Margin="0" /> |
|
||||
|
|
||||
<RepeatButton Name="PART_LineUpButton" |
|
||||
VerticalAlignment="Center" |
|
||||
Classes="line up" |
|
||||
Grid.Column="0" |
|
||||
Focusable="False" |
|
||||
MinHeight="{DynamicResource ScrollBarSize}" |
|
||||
Width="{DynamicResource ScrollBarSize}" /> |
|
||||
|
|
||||
<Track Grid.Column="1" |
|
||||
Minimum="{TemplateBinding Minimum}" |
|
||||
Maximum="{TemplateBinding Maximum}" |
|
||||
Value="{TemplateBinding Value, Mode=TwoWay}" |
|
||||
ViewportSize="{TemplateBinding ViewportSize}" |
|
||||
Orientation="{TemplateBinding Orientation}"> |
|
||||
<Track.DecreaseButton> |
|
||||
<RepeatButton Name="PART_PageUpButton" |
|
||||
Classes="largeIncrease" |
|
||||
Focusable="False" /> |
|
||||
</Track.DecreaseButton> |
|
||||
<Track.IncreaseButton> |
|
||||
<RepeatButton Name="PART_PageDownButton" |
|
||||
Classes="largeIncrease" |
|
||||
Focusable="False" /> |
|
||||
</Track.IncreaseButton> |
|
||||
<Thumb Classes="thumb" |
|
||||
Opacity="1" |
|
||||
Height="{DynamicResource ScrollBarSize}" |
|
||||
MinWidth="{DynamicResource ScrollBarSize}" |
|
||||
RenderTransformOrigin="50%,100%" /> |
|
||||
</Track> |
|
||||
|
|
||||
<RepeatButton Name="PART_LineDownButton" |
|
||||
VerticalAlignment="Center" |
|
||||
Classes="line down" |
|
||||
Grid.Column="2" |
|
||||
Focusable="False" |
|
||||
MinHeight="{DynamicResource ScrollBarSize}" |
|
||||
Width="{DynamicResource ScrollBarSize}" /> |
|
||||
|
|
||||
</Grid> |
|
||||
</Border> |
|
||||
|
|
||||
</Grid> |
|
||||
</ControlTemplate> |
|
||||
</Setter> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar[IsExpanded=true] /template/ Grid#Root"> |
|
||||
<Setter Property="Background" Value="{DynamicResource ScrollBarBackgroundPointerOver}" /> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar /template/ Thumb.thumb"> |
|
||||
<Setter Property="Background" Value="{DynamicResource ScrollBarPanningThumbBackground}" /> |
|
||||
<Setter Property="Template"> |
<Setter Property="Template"> |
||||
<Setter.Value> |
<Setter.Value> |
||||
<ControlTemplate> |
<ControlTemplate> |
||||
<Border x:Name="ThumbVisual" Background="{TemplateBinding Background}" /> |
<Border Background="{TemplateBinding Background}" |
||||
|
CornerRadius="{TemplateBinding CornerRadius}"/> |
||||
</ControlTemplate> |
</ControlTemplate> |
||||
</Setter.Value> |
</Setter.Value> |
||||
</Setter> |
</Setter> |
||||
<Setter Property="Transitions"> |
<Setter Property="Transitions"> |
||||
<Transitions> |
<Transitions> |
||||
|
<CornerRadiusTransition Property="CornerRadius" Duration="0:0:0.1" /> |
||||
<TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.1" /> |
<TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.1" /> |
||||
</Transitions> |
</Transitions> |
||||
</Setter> |
</Setter> |
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar:vertical /template/ Thumb.thumb"> |
<Style Selector="^:pointerover /template/ Border"> |
||||
<Setter Property="RenderTransform" Value="{DynamicResource VerticalSmallScrollThumbScaleTransform}" /> |
<Setter Property="Background" Value="{DynamicResource ScrollBarThumbFillPointerOver}" /> |
||||
</Style> |
</Style> |
||||
|
<Style Selector="^:pressed /template/ Border"> |
||||
<Style Selector="ScrollBar:horizontal /template/ Thumb.thumb"> |
<Setter Property="Background" Value="{DynamicResource ScrollBarThumbFillPressed}" /> |
||||
<Setter Property="RenderTransform" Value="{DynamicResource HorizontalSmallScrollThumbScaleTransform}" /> |
</Style> |
||||
</Style> |
<Style Selector="^:disabled /template/ Border"> |
||||
|
<Setter Property="Background" Value="{DynamicResource ScrollBarThumbFillDisabled}" /> |
||||
<Style Selector="ScrollBar[IsExpanded=true] /template/ Thumb.thumb"> |
</Style> |
||||
<Setter Property="RenderTransform" Value="none" /> |
</ControlTheme> |
||||
<Setter Property="Background" Value="{DynamicResource ScrollBarThumbBackgroundColor}" /> |
|
||||
</Style> |
<ControlTheme x:Key="FluentScrollBarPageButton" TargetType="RepeatButton"> |
||||
|
<Setter Property="Background" Value="Transparent" /> |
||||
<Style Selector="ScrollBar /template/ Thumb.thumb /template/ Border#ThumbVisual"> |
<Setter Property="VerticalAlignment" Value="Stretch" /> |
||||
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" /> |
<Setter Property="HorizontalAlignment" Value="Stretch" /> |
||||
<Setter Property="Transitions"> |
<Setter Property="Opacity" Value="0" /> |
||||
<Transitions> |
<Setter Property="Template"> |
||||
<CornerRadiusTransition Property="CornerRadius" Duration="0:0:0.1" /> |
<ControlTemplate> |
||||
</Transitions> |
<Border Background="{TemplateBinding Background}" /> |
||||
|
</ControlTemplate> |
||||
</Setter> |
</Setter> |
||||
</Style> |
</ControlTheme> |
||||
|
|
||||
<Style Selector="ScrollBar[IsExpanded=true] /template/ Thumb.thumb /template/ Border#ThumbVisual"> |
|
||||
<Setter Property="CornerRadius" Value="0" /> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar /template/ Thumb.thumb:pointerover"> |
|
||||
<Setter Property="Background" Value="{DynamicResource ScrollBarThumbFillPointerOver}" /> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar /template/ Thumb.thumb:pressed"> |
<ControlTheme x:Key="FluentScrollBarLineButton" TargetType="RepeatButton"> |
||||
<Setter Property="Background" Value="{DynamicResource ScrollBarThumbFillPressed}" /> |
<Setter Property="Opacity" Value="0" /> |
||||
</Style> |
<Setter Property="TextElement.Foreground" Value="{DynamicResource ScrollBarButtonArrowForeground}"/> |
||||
|
|
||||
<Style Selector="ScrollBar /template/ Thumb.thumb:disabled"> |
|
||||
<Setter Property="Background" Value="{DynamicResource ScrollBarThumbFillDisabled}" /> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar /template/ RepeatButton.line"> |
|
||||
<Setter Property="Template"> |
<Setter Property="Template"> |
||||
<ControlTemplate> |
<ControlTemplate> |
||||
<Border x:Name="Root"> |
<ContentPresenter Background="{DynamicResource ScrollBarButtonBackground}" |
||||
<Viewbox Width="{DynamicResource ScrollBarButtonArrowIconFontSize}" |
BorderBrush="{DynamicResource ScrollBarButtonBorderBrush}" |
||||
Height="{DynamicResource ScrollBarButtonArrowIconFontSize}"> |
Content="{TemplateBinding Content}"/> |
||||
<Path x:Name="Arrow" |
|
||||
VerticalAlignment="Center" |
|
||||
HorizontalAlignment="Center" |
|
||||
Width="20" Height="20" /> |
|
||||
</Viewbox> |
|
||||
</Border> |
|
||||
</ControlTemplate> |
</ControlTemplate> |
||||
</Setter> |
</Setter> |
||||
<Setter Property="Opacity" Value="0" /> |
|
||||
<Setter Property="Transitions"> |
<Setter Property="Transitions"> |
||||
<Transitions> |
<Transitions> |
||||
<DoubleTransition Property="Opacity" Duration="0:0:0.1" /> |
<DoubleTransition Property="Opacity" Duration="0:0:0.1" /> |
||||
</Transitions> |
</Transitions> |
||||
</Setter> |
</Setter> |
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar /template/ RepeatButton.line /template/ Border#Root" > |
|
||||
<Setter Property="Background" Value="{DynamicResource ScrollBarButtonBackground}" /> |
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ScrollBarButtonBorderBrush}" /> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar /template/ RepeatButton.line:pointerover /template/ Border#Root" > |
<Style Selector="^:pointerover"> |
||||
<Setter Property="Background" Value="{DynamicResource ScrollBarButtonBackgroundPointerOver}" /> |
<Setter Property="TextElement.Foreground" Value="{DynamicResource ScrollBarButtonArrowForegroundPointerOver}"/> |
||||
<Setter Property="BorderBrush" Value="{DynamicResource ScrollBarButtonBorderBrushPointerOver}" /> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar /template/ RepeatButton.line:pressed /template/ Border#Root" > |
<Style Selector="^ /template/ ContentPresenter" > |
||||
<Setter Property="Background" Value="{DynamicResource ScrollBarButtonBackgroundPressed}" /> |
<Setter Property="Background" Value="{DynamicResource ScrollBarButtonBackgroundPointerOver}" /> |
||||
<Setter Property="BorderBrush" Value="{DynamicResource ScrollBarButtonBorderBrushPressed}" /> |
<Setter Property="BorderBrush" Value="{DynamicResource ScrollBarButtonBorderBrushPointerOver}" /> |
||||
</Style> |
</Style> |
||||
|
</Style> |
||||
|
|
||||
<Style Selector="ScrollBar /template/ RepeatButton.line:disabled /template/ Border#Root" > |
<Style Selector="^:pressed"> |
||||
<Setter Property="Background" Value="{DynamicResource ScrollBarButtonBackgroundPressed}" /> |
<Setter Property="TextElement.Foreground" Value="{DynamicResource ScrollBarButtonArrowForegroundPressed}"/> |
||||
<Setter Property="BorderBrush" Value="{DynamicResource ScrollBarButtonBorderBrushDisabled}" /> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar /template/ RepeatButton.line /template/ Path#Arrow" > |
<Style Selector="^ /template/ ContentPresenter" > |
||||
<Setter Property="Fill" Value="{DynamicResource ScrollBarButtonArrowForeground}" /> |
<Setter Property="Background" Value="{DynamicResource ScrollBarButtonBackgroundPressed}" /> |
||||
</Style> |
<Setter Property="BorderBrush" Value="{DynamicResource ScrollBarButtonBorderBrushPressed}" /> |
||||
|
</Style> |
||||
|
</Style> |
||||
|
|
||||
<Style Selector="ScrollBar /template/ RepeatButton.line:pointerover /template/ Path#Arrow" > |
<Style Selector="^:disabled"> |
||||
<Setter Property="Fill" Value="{DynamicResource ScrollBarButtonArrowForegroundPointerOver}" /> |
<Setter Property="TextElement.Foreground" Value="{DynamicResource ScrollBarButtonArrowForegroundDisabled}"/> |
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar /template/ RepeatButton.line:pressed /template/ Path#Arrow" > |
<Style Selector="^ /template/ ContentPresenter" > |
||||
<Setter Property="Fill" Value="{DynamicResource ScrollBarButtonArrowForegroundPressed}" /> |
<Setter Property="Background" Value="{DynamicResource ScrollBarButtonBackgroundDisabled}" /> |
||||
</Style> |
<Setter Property="BorderBrush" Value="{DynamicResource ScrollBarButtonBorderBrushDisabled}" /> |
||||
|
</Style> |
||||
|
</Style> |
||||
|
</ControlTheme> |
||||
|
|
||||
<Style Selector="ScrollBar /template/ RepeatButton.line:disabled /template/ Path#Arrow" > |
<ControlTheme x:Key="{x:Type ScrollBar}" TargetType="ScrollBar"> |
||||
<Setter Property="Fill" Value="{DynamicResource ScrollBarButtonArrowForegroundDisabled}" /> |
<Setter Property="MinWidth" Value="{DynamicResource ScrollBarSize}" /> |
||||
</Style> |
<Setter Property="MinHeight" Value="{DynamicResource ScrollBarSize}" /> |
||||
|
<Setter Property="Background" Value="{DynamicResource ScrollBarBackground}" /> |
||||
<Style Selector="ScrollBar[IsExpanded=true] /template/ RepeatButton.line"> |
<Setter Property="Foreground" Value="{DynamicResource ScrollBarForeground}" /> |
||||
<Setter Property="Opacity" Value="1" /> |
<Setter Property="BorderBrush" Value="{DynamicResource ScrollBarBorderBrush}" /> |
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar:vertical /template/ RepeatButton.line.up /template/ Path"> |
|
||||
<Setter Property="Data" |
|
||||
Value="M 19.091797 14.970703 L 10 5.888672 L 0.908203 14.970703 L 0.029297 14.091797 L 10 4.111328 L 19.970703 14.091797 Z" /> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar:vertical /template/ RepeatButton.line.down /template/ Path"> |
|
||||
<Setter Property="Data" |
|
||||
Value="M 18.935547 4.560547 L 19.814453 5.439453 L 10 15.253906 L 0.185547 5.439453 L 1.064453 4.560547 L 10 13.496094 Z" /> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar:horizontal /template/ RepeatButton.line.up /template/ Path"> |
|
||||
<Setter Property="Data" Value="M 14.091797 19.970703 L 4.111328 10 L 14.091797 0.029297 L 14.970703 0.908203 L 5.888672 10 L 14.970703 19.091797 Z" /> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar:horizontal /template/ RepeatButton.line.down /template/ Path"> |
|
||||
<Setter Property="Data" Value="M 5.029297 19.091797 L 14.111328 10 L 5.029297 0.908203 L 5.908203 0.029297 L 15.888672 10 L 5.908203 19.970703 Z" /> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar /template/ Rectangle#TrackRect"> |
|
||||
<Setter Property="StrokeThickness" Value="{DynamicResource ScrollBarTrackBorderThemeThickness}" /> |
|
||||
<Setter Property="Fill" Value="{DynamicResource ScrollBarTrackFill}" /> |
|
||||
<Setter Property="Stroke" Value="{DynamicResource ScrollBarTrackStroke}" /> |
|
||||
<Setter Property="Opacity" Value="0" /> |
|
||||
<Setter Property="Transitions"> |
|
||||
<Transitions> |
|
||||
<DoubleTransition Property="Opacity" Duration="0:0:0.1" /> |
|
||||
</Transitions> |
|
||||
</Setter> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar[IsExpanded=true] /template/ Rectangle#TrackRect"> |
|
||||
<Setter Property="Fill" Value="{DynamicResource ScrollBarTrackFillPointerOver}" /> |
|
||||
<Setter Property="Stroke" Value="{DynamicResource ScrollBarTrackStrokePointerOver}" /> |
|
||||
<Setter Property="Opacity" Value="1" /> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar /template/ RepeatButton.largeIncrease"> |
|
||||
<Setter Property="Template"> |
|
||||
<ControlTemplate> |
|
||||
<Border Background="{TemplateBinding Background}" /> |
|
||||
</ControlTemplate> |
|
||||
</Setter> |
|
||||
<Setter Property="Background" Value="Transparent" /> |
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" /> |
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" /> |
|
||||
<Setter Property="Opacity" Value="0" /> |
|
||||
</Style> |
|
||||
|
|
||||
<Style Selector="ScrollBar[IsExpanded=true] /template/ RepeatButton.largeIncrease"> |
<Style Selector="^:vertical"> |
||||
<Setter Property="Opacity" Value="1" /> |
<Setter Property="Template"> |
||||
</Style> |
<ControlTemplate> |
||||
|
<Grid x:Name="Root"> |
||||
|
<Border x:Name="VerticalRoot" |
||||
|
Background="{TemplateBinding Background}" |
||||
|
BorderBrush="{TemplateBinding BorderBrush}"> |
||||
|
<Grid RowDefinitions="Auto,*,Auto"> |
||||
|
<Rectangle x:Name="TrackRect" |
||||
|
Fill="{DynamicResource ScrollBarTrackFill}" |
||||
|
Stroke="{DynamicResource ScrollBarTrackStroke}" |
||||
|
StrokeThickness="{DynamicResource ScrollBarTrackBorderThemeThickness}" |
||||
|
Opacity="0" |
||||
|
Grid.RowSpan="3"> |
||||
|
<Rectangle.Transitions> |
||||
|
<Transitions> |
||||
|
<DoubleTransition Property="Opacity" Duration="0:0:0.1" /> |
||||
|
</Transitions> |
||||
|
</Rectangle.Transitions> |
||||
|
</Rectangle> |
||||
|
|
||||
|
<RepeatButton Name="PART_LineUpButton" |
||||
|
HorizontalAlignment="Center" |
||||
|
Theme="{StaticResource FluentScrollBarLineButton}" |
||||
|
Grid.Row="0" |
||||
|
Focusable="False" |
||||
|
MinWidth="{DynamicResource ScrollBarSize}" |
||||
|
Height="{DynamicResource ScrollBarSize}"> |
||||
|
<PathIcon Data="M 19.091797 14.970703 L 10 5.888672 L 0.908203 14.970703 L 0.029297 14.091797 L 10 4.111328 L 19.970703 14.091797 Z" |
||||
|
Width="{DynamicResource ScrollBarButtonArrowIconFontSize}" |
||||
|
Height="{DynamicResource ScrollBarButtonArrowIconFontSize}"/> |
||||
|
</RepeatButton> |
||||
|
|
||||
|
<Track Grid.Row="1" |
||||
|
Minimum="{TemplateBinding Minimum}" |
||||
|
Maximum="{TemplateBinding Maximum}" |
||||
|
Value="{TemplateBinding Value, Mode=TwoWay}" |
||||
|
ViewportSize="{TemplateBinding ViewportSize}" |
||||
|
Orientation="{TemplateBinding Orientation}" |
||||
|
IsDirectionReversed="True"> |
||||
|
<Track.DecreaseButton> |
||||
|
<RepeatButton Name="PART_PageUpButton" |
||||
|
Classes="largeIncrease" |
||||
|
Theme="{StaticResource FluentScrollBarPageButton}" |
||||
|
Focusable="False" /> |
||||
|
</Track.DecreaseButton> |
||||
|
<Track.IncreaseButton> |
||||
|
<RepeatButton Name="PART_PageDownButton" |
||||
|
Classes="largeIncrease" |
||||
|
Theme="{StaticResource FluentScrollBarPageButton}" |
||||
|
Focusable="False" /> |
||||
|
</Track.IncreaseButton> |
||||
|
<Thumb Theme="{StaticResource FluentScrollBarThumb}" |
||||
|
Width="{DynamicResource ScrollBarSize}" |
||||
|
MinHeight="{DynamicResource ScrollBarSize}" |
||||
|
RenderTransform="{DynamicResource VerticalSmallScrollThumbScaleTransform}" |
||||
|
RenderTransformOrigin="100%,50%" /> |
||||
|
</Track> |
||||
|
|
||||
|
<RepeatButton Name="PART_LineDownButton" |
||||
|
HorizontalAlignment="Center" |
||||
|
Theme="{StaticResource FluentScrollBarLineButton}" |
||||
|
Grid.Row="2" |
||||
|
Focusable="False" |
||||
|
MinWidth="{DynamicResource ScrollBarSize}" |
||||
|
Height="{DynamicResource ScrollBarSize}"> |
||||
|
<PathIcon Data="M 18.935547 4.560547 L 19.814453 5.439453 L 10 15.253906 L 0.185547 5.439453 L 1.064453 4.560547 L 10 13.496094 Z" |
||||
|
Width="{DynamicResource ScrollBarButtonArrowIconFontSize}" |
||||
|
Height="{DynamicResource ScrollBarButtonArrowIconFontSize}"/> |
||||
|
</RepeatButton> |
||||
|
</Grid> |
||||
|
</Border> |
||||
|
</Grid> |
||||
|
</ControlTemplate> |
||||
|
</Setter> |
||||
|
</Style> |
||||
|
|
||||
</Styles> |
<Style Selector="^:horizontal"> |
||||
|
<Setter Property="Template"> |
||||
|
<ControlTemplate> |
||||
|
<Grid x:Name="Root"> |
||||
|
<Border x:Name="HorizontalRoot" |
||||
|
Background="{TemplateBinding Background}" |
||||
|
BorderBrush="{TemplateBinding BorderBrush}"> |
||||
|
<Grid ColumnDefinitions="Auto,*,Auto"> |
||||
|
<Rectangle x:Name="TrackRect" |
||||
|
Fill="{DynamicResource ScrollBarTrackFill}" |
||||
|
Stroke="{DynamicResource ScrollBarTrackStroke}" |
||||
|
StrokeThickness="{DynamicResource ScrollBarTrackBorderThemeThickness}" |
||||
|
Opacity="0" |
||||
|
Grid.ColumnSpan="3"> |
||||
|
<Rectangle.Transitions> |
||||
|
<Transitions> |
||||
|
<DoubleTransition Property="Opacity" Duration="0:0:0.1" /> |
||||
|
</Transitions> |
||||
|
</Rectangle.Transitions> |
||||
|
</Rectangle> |
||||
|
|
||||
|
<RepeatButton Name="PART_LineUpButton" |
||||
|
Theme="{StaticResource FluentScrollBarLineButton}" |
||||
|
VerticalAlignment="Center" |
||||
|
Grid.Column="0" |
||||
|
Focusable="False" |
||||
|
MinHeight="{DynamicResource ScrollBarSize}" |
||||
|
Width="{DynamicResource ScrollBarSize}"> |
||||
|
<PathIcon Data="M 14.091797 19.970703 L 4.111328 10 L 14.091797 0.029297 L 14.970703 0.908203 L 5.888672 10 L 14.970703 19.091797 Z" |
||||
|
Width="{DynamicResource ScrollBarButtonArrowIconFontSize}" |
||||
|
Height="{DynamicResource ScrollBarButtonArrowIconFontSize}"/> |
||||
|
</RepeatButton> |
||||
|
|
||||
|
<Track Grid.Column="1" |
||||
|
Minimum="{TemplateBinding Minimum}" |
||||
|
Maximum="{TemplateBinding Maximum}" |
||||
|
Value="{TemplateBinding Value, Mode=TwoWay}" |
||||
|
ViewportSize="{TemplateBinding ViewportSize}" |
||||
|
Orientation="{TemplateBinding Orientation}"> |
||||
|
<Track.DecreaseButton> |
||||
|
<RepeatButton Name="PART_PageUpButton" |
||||
|
Classes="largeIncrease" |
||||
|
Theme="{StaticResource FluentScrollBarPageButton}" |
||||
|
Focusable="False" /> |
||||
|
</Track.DecreaseButton> |
||||
|
<Track.IncreaseButton> |
||||
|
<RepeatButton Name="PART_PageDownButton" |
||||
|
Classes="largeIncrease" |
||||
|
Theme="{StaticResource FluentScrollBarPageButton}" |
||||
|
Focusable="False" /> |
||||
|
</Track.IncreaseButton> |
||||
|
<Thumb Theme="{StaticResource FluentScrollBarThumb}" |
||||
|
Height="{DynamicResource ScrollBarSize}" |
||||
|
MinWidth="{DynamicResource ScrollBarSize}" |
||||
|
RenderTransform="{DynamicResource HorizontalSmallScrollThumbScaleTransform}" |
||||
|
RenderTransformOrigin="50%,100%" /> |
||||
|
</Track> |
||||
|
|
||||
|
<RepeatButton Name="PART_LineDownButton" |
||||
|
Theme="{StaticResource FluentScrollBarLineButton}" |
||||
|
VerticalAlignment="Center" |
||||
|
Grid.Column="2" |
||||
|
Focusable="False" |
||||
|
MinHeight="{DynamicResource ScrollBarSize}" |
||||
|
Width="{DynamicResource ScrollBarSize}"> |
||||
|
<PathIcon Data="M 5.029297 19.091797 L 14.111328 10 L 5.029297 0.908203 L 5.908203 0.029297 L 15.888672 10 L 5.908203 19.970703 Z" |
||||
|
Width="{DynamicResource ScrollBarButtonArrowIconFontSize}" |
||||
|
Height="{DynamicResource ScrollBarButtonArrowIconFontSize}"/> |
||||
|
</RepeatButton> |
||||
|
</Grid> |
||||
|
</Border> |
||||
|
</Grid> |
||||
|
</ControlTemplate> |
||||
|
</Setter> |
||||
|
</Style> |
||||
|
|
||||
|
<Style Selector="^[IsExpanded=true]"> |
||||
|
<Style Selector="^ /template/ Grid#Root"> |
||||
|
<Setter Property="Background" Value="{DynamicResource ScrollBarBackgroundPointerOver}" /> |
||||
|
</Style> |
||||
|
<Style Selector="^ /template/ Rectangle#TrackRect"> |
||||
|
<Setter Property="Fill" Value="{DynamicResource ScrollBarTrackFillPointerOver}" /> |
||||
|
<Setter Property="Stroke" Value="{DynamicResource ScrollBarTrackStrokePointerOver}" /> |
||||
|
<Setter Property="Opacity" Value="1" /> |
||||
|
</Style> |
||||
|
<Style Selector="^ /template/ Thumb"> |
||||
|
<Setter Property="Background" Value="{DynamicResource ScrollBarThumbBackgroundColor}" /> |
||||
|
<Setter Property="RenderTransform" Value="none" /> |
||||
|
</Style> |
||||
|
<Style Selector="^ /template/ RepeatButton"> |
||||
|
<Setter Property="Opacity" Value="1" /> |
||||
|
</Style> |
||||
|
</Style> |
||||
|
</ControlTheme> |
||||
|
|
||||
|
</ResourceDictionary> |
||||
|
|||||
Loading…
Reference in new issue