1 file changed
+21
-12
@@ -20,16 +20,7 @@
|
|||||||
<Setter Property="Height" Value="10"/>
|
<Setter Property="Height" Value="10"/>
|
||||||
<Setter Property="Padding" Value="0,2"/>
|
<Setter Property="Padding" Value="0,2"/>
|
||||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
<Setter Property="Visibility">
|
<Setter Property="ClickMode" Value="Hover"/>
|
||||||
<Setter.Value>
|
|
||||||
<MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
|
|
||||||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility" />
|
|
||||||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset" />
|
|
||||||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight" />
|
|
||||||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight" />
|
|
||||||
</MultiBinding>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<ControlTemplate x:Key="ScrollViewerUpDownControlTemplate" TargetType="ScrollViewer">
|
<ControlTemplate x:Key="ScrollViewerUpDownControlTemplate" TargetType="ScrollViewer">
|
||||||
@@ -39,9 +30,27 @@
|
|||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<RepeatButton Style="{StaticResource ScrollViewerUpDownRepeatButtonStyle}" hc:IconElement.Geometry="{StaticResource UpGeometry}" CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Command="{x:Static ScrollBar.LineUpCommand}"/>
|
<RepeatButton Style="{StaticResource ScrollViewerUpDownRepeatButtonStyle}" hc:IconElement.Geometry="{StaticResource UpGeometry}" CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Command="{x:Static ScrollBar.LineUpCommand}">
|
||||||
|
<RepeatButton.Visibility>
|
||||||
|
<MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
|
||||||
|
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility" />
|
||||||
|
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset" />
|
||||||
|
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight" />
|
||||||
|
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight" />
|
||||||
|
</MultiBinding>
|
||||||
|
</RepeatButton.Visibility>
|
||||||
|
</RepeatButton>
|
||||||
<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="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="1"/>
|
||||||
<RepeatButton Style="{StaticResource ScrollViewerUpDownRepeatButtonStyle}" hc:IconElement.Geometry="{StaticResource DownGeometry}" CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="2" Command="{x:Static ScrollBar.LineDownCommand}"/>
|
<RepeatButton Style="{StaticResource ScrollViewerUpDownRepeatButtonStyle}" hc:IconElement.Geometry="{StaticResource DownGeometry}" CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="2" Command="{x:Static ScrollBar.LineDownCommand}">
|
||||||
|
<RepeatButton.Visibility>
|
||||||
|
<MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
|
||||||
|
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility" />
|
||||||
|
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset" />
|
||||||
|
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight" />
|
||||||
|
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight" />
|
||||||
|
</MultiBinding>
|
||||||
|
</RepeatButton.Visibility>
|
||||||
|
</RepeatButton>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user