Files
ShrlAlgoToolkit/Melskin/Controls/ScrollViewer.xaml

415 lines
20 KiB
Plaintext
Raw Normal View History

2025-07-31 20:12:01 +08:00
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2026-02-20 15:31:44 +08:00
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
2026-01-02 17:30:41 +08:00
xmlns:assists="clr-namespace:Melskin.Assists"
2026-02-20 15:31:44 +08:00
xmlns:markup="clr-namespace:Melskin.Markup">
2025-07-31 20:12:24 +08:00
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="RepeatButtonTransparent.xaml" />
</ResourceDictionary.MergedDictionaries>
2025-07-31 20:12:01 +08:00
<!-- 显示两端按钮 -->
2025-07-11 09:20:23 +08:00
<Storyboard x:Key="ShowScrollItem">
2025-07-31 20:12:01 +08:00
<DoubleAnimation
Storyboard.TargetName="border"
Storyboard.TargetProperty="Opacity"
2026-02-20 15:31:44 +08:00
To="1"
Duration="0:0:0.2" />
2025-07-11 09:20:23 +08:00
</Storyboard>
2025-07-31 20:12:01 +08:00
<!-- 隐藏两端按钮 -->
2025-07-11 09:20:23 +08:00
<Storyboard x:Key="HideScrollItem">
2025-07-31 20:12:01 +08:00
<DoubleAnimationUsingKeyFrames
Storyboard.TargetName="border"
2026-02-20 15:31:44 +08:00
Storyboard.TargetProperty="Opacity"
Duration="0:0:1.2">
2025-07-31 20:12:01 +08:00
<LinearDoubleKeyFrame KeyTime="0:0:0.2" Value="1" />
<LinearDoubleKeyFrame KeyTime="0:0:1" Value="1" />
<LinearDoubleKeyFrame KeyTime="0:0:1.2" Value="0" />
2025-07-11 09:20:23 +08:00
</DoubleAnimationUsingKeyFrames>
</Storyboard>
2025-07-31 20:12:01 +08:00
<!-- 展开滚动条 -->
2025-07-11 09:20:23 +08:00
<Storyboard x:Key="ExpandBar">
2025-07-31 20:12:01 +08:00
<ThicknessAnimation
Storyboard.TargetName="rectangle"
Storyboard.TargetProperty="Margin"
2026-02-20 15:31:44 +08:00
To="1"
Duration="0:0:0.2" />
2025-07-31 20:12:01 +08:00
<DoubleAnimation
Storyboard.TargetName="rectangle"
Storyboard.TargetProperty="RadiusX"
2026-02-20 15:31:44 +08:00
To="4"
Duration="0:0:0.2" />
2025-07-31 20:12:01 +08:00
<DoubleAnimation
Storyboard.TargetName="rectangle"
Storyboard.TargetProperty="RadiusY"
2026-02-20 15:31:44 +08:00
To="4"
Duration="0:0:0.2" />
2025-07-11 09:20:23 +08:00
</Storyboard>
2025-07-31 20:12:01 +08:00
<!-- 收缩垂直滚动条 -->
2025-07-11 09:20:23 +08:00
<Storyboard x:Key="ShrinkVerticalBar">
2025-07-31 20:12:01 +08:00
<ThicknessAnimationUsingKeyFrames
Storyboard.TargetName="rectangle"
2026-02-20 15:31:44 +08:00
Storyboard.TargetProperty="Margin"
Duration="0:0:1.2">
2025-07-31 20:12:01 +08:00
<LinearThicknessKeyFrame KeyTime="0:0:0.2" Value="1" />
<LinearThicknessKeyFrame KeyTime="0:0:1" Value="1" />
<LinearThicknessKeyFrame KeyTime="0:0:1.2" Value="6,1,1,1" />
2025-07-11 09:20:23 +08:00
</ThicknessAnimationUsingKeyFrames>
2025-07-31 20:12:01 +08:00
<DoubleAnimationUsingKeyFrames
Storyboard.TargetName="rectangle"
2026-02-20 15:31:44 +08:00
Storyboard.TargetProperty="RadiusX"
Duration="0:0:1.2">
2025-07-31 20:12:01 +08:00
<LinearDoubleKeyFrame KeyTime="0:0:0.2" Value="4" />
<LinearDoubleKeyFrame KeyTime="0:0:1" Value="4" />
<LinearDoubleKeyFrame KeyTime="0:0:1.2" Value="1.5" />
2025-07-11 09:20:23 +08:00
</DoubleAnimationUsingKeyFrames>
2025-07-31 20:12:01 +08:00
<DoubleAnimationUsingKeyFrames
Storyboard.TargetName="rectangle"
2026-02-20 15:31:44 +08:00
Storyboard.TargetProperty="RadiusY"
Duration="0:0:1.2">
2025-07-31 20:12:01 +08:00
<LinearDoubleKeyFrame KeyTime="0:0:0.2" Value="4" />
<LinearDoubleKeyFrame KeyTime="0:0:1" Value="4" />
<LinearDoubleKeyFrame KeyTime="0:0:1.2" Value="1.5" />
2025-07-11 09:20:23 +08:00
</DoubleAnimationUsingKeyFrames>
</Storyboard>
2025-07-31 20:12:01 +08:00
<!-- 收缩水平滚动条 -->
2025-07-11 09:20:23 +08:00
<Storyboard x:Key="ShrinkHorizontalBar">
2025-07-31 20:12:01 +08:00
<ThicknessAnimationUsingKeyFrames
Storyboard.TargetName="rectangle"
2026-02-20 15:31:44 +08:00
Storyboard.TargetProperty="Margin"
Duration="0:0:1.2">
2025-07-31 20:12:01 +08:00
<LinearThicknessKeyFrame KeyTime="0:0:0.2" Value="1" />
<LinearThicknessKeyFrame KeyTime="0:0:1" Value="1" />
<LinearThicknessKeyFrame KeyTime="0:0:1.2" Value="1,6,1,1" />
2025-07-11 09:20:23 +08:00
</ThicknessAnimationUsingKeyFrames>
2025-07-31 20:12:01 +08:00
<DoubleAnimationUsingKeyFrames
Storyboard.TargetName="rectangle"
2026-02-20 15:31:44 +08:00
Storyboard.TargetProperty="RadiusX"
Duration="0:0:1.2">
2025-07-31 20:12:01 +08:00
<LinearDoubleKeyFrame KeyTime="0:0:0.2" Value="4" />
<LinearDoubleKeyFrame KeyTime="0:0:1" Value="4" />
<LinearDoubleKeyFrame KeyTime="0:0:1.2" Value="1.5" />
2025-07-11 09:20:23 +08:00
</DoubleAnimationUsingKeyFrames>
2025-07-31 20:12:01 +08:00
<DoubleAnimationUsingKeyFrames
Storyboard.TargetName="rectangle"
2026-02-20 15:31:44 +08:00
Storyboard.TargetProperty="RadiusY"
Duration="0:0:1.2">
2025-07-31 20:12:01 +08:00
<LinearDoubleKeyFrame KeyTime="0:0:0.2" Value="4" />
<LinearDoubleKeyFrame KeyTime="0:0:1" Value="4" />
<LinearDoubleKeyFrame KeyTime="0:0:1.2" Value="1.5" />
2025-07-11 09:20:23 +08:00
</DoubleAnimationUsingKeyFrames>
</Storyboard>
2025-07-31 20:12:01 +08:00
<!-- 滚动条两端按钮 -->
2026-02-20 15:31:44 +08:00
<Style x:Key="ScrollBarButtonStyle" TargetType="{x:Type RepeatButton}">
2025-08-26 21:33:20 +08:00
<Setter Property="FocusVisualStyle" Value="{DynamicResource FocusVisual}" />
2025-07-11 09:20:23 +08:00
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<!--<Setter Property="assists:ButtonAssist.Icon" Value="{markup:Icon SymbolValue=ArrowDropUp}" />-->
2025-09-12 09:55:36 +08:00
<Setter Property="Focusable" Value="False" />
<Setter Property="IsTabStop" Value="False" />
2025-07-11 09:20:23 +08:00
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RepeatButton}">
2025-07-31 20:12:01 +08:00
<Border
2026-02-20 15:31:44 +08:00
x:Name="border"
2025-07-31 20:12:01 +08:00
Opacity="0"
2026-02-20 15:31:44 +08:00
SnapsToDevicePixels="true">
<ContentPresenter
2026-02-20 15:31:44 +08:00
x:Name="Icon"
2025-12-23 21:35:54 +08:00
Content="{Binding Path=(assists:ControlAssist.Icon), RelativeSource={RelativeSource TemplatedParent}}"
2026-02-20 15:31:44 +08:00
TextElement.Foreground="{DynamicResource TextSecondaryBrush}" />
2025-07-11 09:20:23 +08:00
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
2026-02-20 15:31:44 +08:00
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource TextPrimaryBrush}" />
2025-07-11 09:20:23 +08:00
</Trigger>
<Trigger Property="IsPressed" Value="true">
2026-02-20 15:31:44 +08:00
<Setter TargetName="border" Property="Margin" Value="1.5" />
2025-07-11 09:20:23 +08:00
</Trigger>
<Trigger Property="IsEnabled" Value="True">
2025-07-31 20:12:01 +08:00
<!-- TODO:不知道是不是要移除原有动画,原有动画是否会被自动释放 -->
2025-07-11 09:20:23 +08:00
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource ShowScrollItem}" />
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource HideScrollItem}" />
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
2025-07-31 20:12:01 +08:00
<!-- 垂直滑块 -->
2026-02-20 15:31:44 +08:00
<Style x:Key="ScrollBarThumbVerticalStyle" TargetType="{x:Type Thumb}">
2025-07-11 09:20:23 +08:00
<Setter Property="OverridesDefaultStyle" Value="true" />
2025-09-12 09:55:36 +08:00
<Setter Property="IsTabStop" Value="False" />
2025-07-11 09:20:23 +08:00
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
2025-07-31 20:12:01 +08:00
<Rectangle
2026-02-20 15:31:44 +08:00
x:Name="rectangle"
Width="{TemplateBinding Width}"
2025-07-31 20:12:01 +08:00
Height="{TemplateBinding Height}"
Margin="6,1,1,1"
2026-02-20 15:31:44 +08:00
Fill="{DynamicResource TextSecondaryBrush}"
2025-07-31 20:12:01 +08:00
RadiusX="1.5"
RadiusY="1.5"
2026-02-20 15:31:44 +08:00
SnapsToDevicePixels="True" />
2025-07-11 09:20:23 +08:00
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="True">
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource ExpandBar}" />
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource ShrinkVerticalBar}" />
</Trigger.ExitActions>
</Trigger>
<Trigger Property="IsDragging" Value="true">
2026-02-20 15:31:44 +08:00
<Setter TargetName="rectangle" Property="Fill" Value="{DynamicResource TextPrimaryBrush}" />
2025-07-11 09:20:23 +08:00
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
2025-07-31 20:12:01 +08:00
<!-- 水平滑块 -->
2026-02-20 15:31:44 +08:00
<Style x:Key="ScrollBarHorizontalThumbStyle" TargetType="{x:Type Thumb}">
2025-07-11 09:20:23 +08:00
<Setter Property="OverridesDefaultStyle" Value="true" />
2025-09-12 09:55:36 +08:00
<Setter Property="IsTabStop" Value="False" />
2025-07-11 09:20:23 +08:00
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
2025-07-31 20:12:01 +08:00
<Rectangle
2026-02-20 15:31:44 +08:00
x:Name="rectangle"
Width="{TemplateBinding Width}"
2025-07-31 20:12:01 +08:00
Height="{TemplateBinding Height}"
Margin="1,6,1,1"
2026-02-20 15:31:44 +08:00
Fill="{DynamicResource TextSecondaryBrush}"
2025-07-31 20:12:01 +08:00
RadiusX="1.5"
RadiusY="1.5"
2026-02-20 15:31:44 +08:00
SnapsToDevicePixels="True" />
2025-07-11 09:20:23 +08:00
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="True">
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource ExpandBar}" />
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource ShrinkHorizontalBar}" />
</Trigger.ExitActions>
</Trigger>
<Trigger Property="IsDragging" Value="true">
2026-02-20 15:31:44 +08:00
<Setter TargetName="rectangle" Property="Fill" Value="{DynamicResource TextPrimaryBrush}" />
2025-07-11 09:20:23 +08:00
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
2026-02-20 15:31:44 +08:00
<ControlTemplate x:Key="ScrollBarVerticalTemplate" TargetType="{x:Type ScrollBar}">
<Grid x:Name="Bg" SnapsToDevicePixels="true">
2025-07-11 09:20:23 +08:00
<Grid.RowDefinitions>
<RowDefinition MaxHeight="10" />
<RowDefinition Height="*" />
<RowDefinition MaxHeight="10" />
</Grid.RowDefinitions>
2025-07-31 20:12:01 +08:00
<Rectangle
2026-02-20 15:31:44 +08:00
x:Name="border"
2026-01-02 17:30:30 +08:00
Grid.RowSpan="3"
2026-02-20 15:31:44 +08:00
Fill="{TemplateBinding Background}"
2025-07-31 20:12:01 +08:00
Opacity="0"
RadiusX="4"
2026-02-20 15:31:44 +08:00
RadiusY="4" />
2025-07-31 20:12:01 +08:00
<RepeatButton
2026-02-20 15:31:44 +08:00
x:Name="PART_LineUpButton"
2026-01-02 17:30:30 +08:00
Grid.Row="0"
assists:ControlAssist.Icon="{markup:Icon SymbolValue=ArrowDropUp}"
2026-02-20 15:31:44 +08:00
Command="{x:Static ScrollBar.LineUpCommand}"
IsEnabled="{TemplateBinding IsMouseOver}"
Style="{StaticResource ScrollBarButtonStyle}" />
2025-07-31 20:12:01 +08:00
<Track
2026-02-20 15:31:44 +08:00
x:Name="PART_Track"
2025-07-31 20:12:01 +08:00
Grid.Row="1"
IsDirectionReversed="true"
2026-02-20 15:31:44 +08:00
IsEnabled="{TemplateBinding IsMouseOver}">
2025-07-11 09:20:23 +08:00
<Track.DecreaseRepeatButton>
2025-10-10 11:19:58 +08:00
<RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource RepeatButtonTransparentStyle}" />
2025-07-11 09:20:23 +08:00
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
2025-10-10 11:19:58 +08:00
<RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource RepeatButtonTransparentStyle}" />
2025-07-11 09:20:23 +08:00
</Track.IncreaseRepeatButton>
<Track.Thumb>
2025-07-31 20:12:01 +08:00
<Thumb
2026-02-20 15:31:44 +08:00
x:Name="ThumbPart"
2025-07-31 20:12:01 +08:00
IsEnabled="False"
2026-02-20 15:31:44 +08:00
Style="{StaticResource ScrollBarThumbVerticalStyle}" />
2025-07-11 09:20:23 +08:00
</Track.Thumb>
</Track>
2025-07-31 20:12:01 +08:00
<RepeatButton
2026-02-20 15:31:44 +08:00
x:Name="PART_LineDownButton"
2026-01-02 17:30:30 +08:00
Grid.Row="2"
assists:ControlAssist.Icon="{markup:Icon SymbolValue=ArrowDropDown}"
2026-02-20 15:31:44 +08:00
Command="{x:Static ScrollBar.LineDownCommand}"
IsEnabled="{TemplateBinding IsMouseOver}"
Style="{StaticResource ScrollBarButtonStyle}" />
2025-07-11 09:20:23 +08:00
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
2026-02-20 15:31:44 +08:00
<Setter TargetName="ThumbPart" Property="IsEnabled" Value="True" />
2025-07-11 09:20:23 +08:00
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource ShowScrollItem}" />
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource HideScrollItem}" />
</Trigger.ExitActions>
</Trigger>
2025-09-12 09:55:36 +08:00
<Trigger Property="IsEnabled" Value="False">
2026-02-20 15:31:44 +08:00
<Setter TargetName="PART_LineUpButton" Property="Visibility" Value="Hidden" />
<Setter TargetName="PART_LineDownButton" Property="Visibility" Value="Hidden" />
2025-07-11 09:20:23 +08:00
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
2026-02-20 15:31:44 +08:00
<ControlTemplate x:Key="ScrollBarHorizontalTemplate" TargetType="{x:Type ScrollBar}">
<Grid x:Name="Bg" SnapsToDevicePixels="true">
2025-07-11 09:20:23 +08:00
<Grid.ColumnDefinitions>
<ColumnDefinition MaxWidth="10" />
<ColumnDefinition Width="*" />
<ColumnDefinition MaxWidth="10" />
</Grid.ColumnDefinitions>
2025-07-31 20:12:01 +08:00
<Rectangle
2026-02-20 15:31:44 +08:00
x:Name="border"
2026-01-02 17:30:30 +08:00
Grid.ColumnSpan="3"
2026-02-20 15:31:44 +08:00
Fill="{TemplateBinding Background}"
2025-07-31 20:12:01 +08:00
Opacity="0"
RadiusX="4"
2026-02-20 15:31:44 +08:00
RadiusY="4" />
2025-07-31 20:12:01 +08:00
<RepeatButton
2026-02-20 15:31:44 +08:00
x:Name="PART_LineLeftButton"
2026-01-02 17:30:30 +08:00
Grid.Column="0"
assists:ControlAssist.Icon="{markup:Icon SymbolValue=ArrowLeft}"
2026-02-20 15:31:44 +08:00
Command="{x:Static ScrollBar.LineLeftCommand}"
IsEnabled="{TemplateBinding IsMouseOver}"
Style="{StaticResource ScrollBarButtonStyle}" />
2025-07-31 20:12:01 +08:00
<Track
2026-02-20 15:31:44 +08:00
x:Name="PART_Track"
2025-07-31 20:12:01 +08:00
Grid.Column="1"
2026-02-20 15:31:44 +08:00
IsEnabled="{TemplateBinding IsMouseOver}">
2025-07-11 09:20:23 +08:00
<Track.DecreaseRepeatButton>
2025-10-10 11:19:58 +08:00
<RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource RepeatButtonTransparentStyle}" />
2025-07-11 09:20:23 +08:00
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
2025-10-10 11:19:58 +08:00
<RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource RepeatButtonTransparentStyle}" />
2025-07-11 09:20:23 +08:00
</Track.IncreaseRepeatButton>
<Track.Thumb>
2025-07-31 20:12:01 +08:00
<Thumb
2026-02-20 15:31:44 +08:00
x:Name="ThumbPart"
2025-07-31 20:12:01 +08:00
IsEnabled="False"
2026-02-20 15:31:44 +08:00
Style="{StaticResource ScrollBarHorizontalThumbStyle}" />
2025-07-11 09:20:23 +08:00
</Track.Thumb>
</Track>
2025-07-31 20:12:01 +08:00
<RepeatButton
2026-02-20 15:31:44 +08:00
x:Name="PART_LineRightButton"
2026-01-02 17:30:30 +08:00
Grid.Column="2"
assists:ControlAssist.Icon="{markup:Icon SymbolValue=ArrowRight}"
2026-02-20 15:31:44 +08:00
Command="{x:Static ScrollBar.LineRightCommand}"
IsEnabled="{TemplateBinding IsMouseOver}"
Style="{StaticResource ScrollBarButtonStyle}" />
2025-07-11 09:20:23 +08:00
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
2026-02-20 15:31:44 +08:00
<Setter TargetName="ThumbPart" Property="IsEnabled" Value="True" />
2025-07-11 09:20:23 +08:00
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource ShowScrollItem}" />
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource HideScrollItem}" />
</Trigger.ExitActions>
</Trigger>
2025-09-12 09:55:36 +08:00
<Trigger Property="IsEnabled" Value="False">
2026-02-20 15:31:44 +08:00
<Setter TargetName="PART_LineLeftButton" Property="Visibility" Value="Hidden" />
<Setter TargetName="PART_LineRightButton" Property="Visibility" Value="Hidden" />
2025-07-11 09:20:23 +08:00
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
2025-07-31 20:12:01 +08:00
<!-- 滚动条样式 -->
2025-07-11 09:20:23 +08:00
<Style TargetType="{x:Type ScrollBar}">
2025-09-12 09:55:36 +08:00
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="False" />
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
2025-08-12 23:08:54 +08:00
<Setter Property="Background" Value="{DynamicResource ControlBackgroundNormalBrush}" />
2025-07-11 09:20:23 +08:00
<Setter Property="BorderThickness" Value="1,0" />
<Setter Property="Width" Value="10" />
<Setter Property="MinWidth" Value="10" />
<Setter Property="Template" Value="{StaticResource ScrollBarVerticalTemplate}" />
<Style.Triggers>
<Trigger Property="Orientation" Value="Horizontal">
<Setter Property="Width" Value="Auto" />
<Setter Property="MinWidth" Value="0" />
<Setter Property="Height" Value="10" />
<Setter Property="MinHeight" Value="10" />
<Setter Property="BorderThickness" Value="0,1" />
<Setter Property="Template" Value="{StaticResource ScrollBarHorizontalTemplate}" />
</Trigger>
</Style.Triggers>
</Style>
2025-07-31 20:12:01 +08:00
<!-- 滚动视图 -->
2025-07-11 09:20:23 +08:00
<Style TargetType="{x:Type ScrollViewer}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollViewer}">
2026-02-20 15:31:44 +08:00
<Grid x:Name="Grid" Background="{TemplateBinding Background}">
2025-07-11 09:20:23 +08:00
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
2025-07-31 20:12:01 +08:00
<ScrollContentPresenter
2026-02-20 15:31:44 +08:00
x:Name="PART_ScrollContentPresenter"
Grid.Row="0"
Grid.Column="0"
Margin="{TemplateBinding Padding}"
2025-07-31 20:12:01 +08:00
CanContentScroll="{TemplateBinding CanContentScroll}"
CanHorizontallyScroll="False"
CanVerticallyScroll="False"
Content="{TemplateBinding Content}"
2026-02-20 15:31:44 +08:00
ContentTemplate="{TemplateBinding ContentTemplate}" />
2026-01-02 17:30:30 +08:00
<ScrollBar
2026-02-20 15:31:44 +08:00
x:Name="PART_VerticalScrollBar"
Grid.Row="0"
Grid.Column="1"
2025-07-31 20:12:01 +08:00
AutomationProperties.AutomationId="VerticalScrollBar"
Cursor="Arrow"
Maximum="{TemplateBinding ScrollableHeight}"
Minimum="0"
ViewportSize="{TemplateBinding ViewportHeight}"
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
2026-02-20 15:31:44 +08:00
Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
2025-07-31 20:12:01 +08:00
<ScrollBar
2026-02-20 15:31:44 +08:00
x:Name="PART_HorizontalScrollBar"
Grid.Row="1"
Grid.Column="0"
2025-07-31 20:12:01 +08:00
AutomationProperties.AutomationId="HorizontalScrollBar"
Cursor="Arrow"
Maximum="{TemplateBinding ScrollableWidth}"
Minimum="0"
Orientation="Horizontal"
ViewportSize="{TemplateBinding ViewportWidth}"
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
2026-02-20 15:31:44 +08:00
Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
2025-07-11 09:20:23 +08:00
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
2025-09-12 09:55:36 +08:00
<Trigger Property="IsEnabled" Value="False">
2025-08-12 23:08:54 +08:00
<Setter Property="Foreground" Value="{DynamicResource TextDisabledBrush}" />
2025-07-11 09:20:23 +08:00
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>