mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-06-07 01:08:18 +08:00
[PowerToys Run] Vertical scrollbar for results list (#4343)
* Enabling vertical scrollbar and colors * Extending the list under the scrollbar * Fix
This commit is contained in:
parent
da38e6a23d
commit
59ce90e924
@ -11,9 +11,9 @@
|
||||
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<!--<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Styles/UWPScrollBarStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>-->
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Styles/ModernScrollBarStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
<Style x:Key="FocusVisual">
|
||||
@ -128,7 +128,7 @@
|
||||
ItemsSource="{Binding Results.Results, Mode=OneWay}"
|
||||
Padding="0, 0"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
SelectionMode="Single"
|
||||
SelectedIndex="{Binding Results.SelectedIndex, Mode=TwoWay}"
|
||||
ItemContainerStyle="{StaticResource ResultsListViewItemContainerStyle}">
|
||||
@ -158,7 +158,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
<Image x:Name="AppIcon" Height="36" MaxWidth="56" Grid.RowSpan="2" Margin="-8,0,0,0" HorizontalAlignment="Center" Source="{Binding Image}" />
|
||||
<TextBlock x:Name="Title" Grid.Column="1" Text="{Binding Result.Title}" FontWeight="SemiBold" FontSize="20" Margin="0,0,0,-2" VerticalAlignment="Bottom"/>
|
||||
<TextBlock x:Name="Path" Grid.Column="1" Text= "{Binding Result.SubTitle}" Grid.Row="1" Foreground="{DynamicResource SecondaryTextBrush}" Margin="0,2,0,0" VerticalAlignment="Top"/>
|
||||
<TextBlock x:Name="Path" Grid.Column="1" Text= "{Binding Result.SubTitle}" Grid.Row="1" Foreground="{DynamicResource SecondaryTextForeground}" Margin="0,2,0,0" VerticalAlignment="Top"/>
|
||||
<ListView
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
|
@ -0,0 +1,339 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Style x:Key="ScrollBarLineButton"
|
||||
TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="true" />
|
||||
<Setter Property="Focusable" Value="false" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Border x:Name="Border" Background="{DynamicResource ScrollBarLineButtonBackground}" Margin="0">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="MouseOver">
|
||||
<Storyboard>
|
||||
<ColorAnimation To="{DynamicResource ScrollBarLineButtonBackgroundPointerOver}"
|
||||
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
|
||||
Duration="0"/>
|
||||
<ColorAnimation To="{DynamicResource ScrollBarLineButtonForegroundPointerOver}"
|
||||
Storyboard.TargetName="Arrow"
|
||||
Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"
|
||||
Duration="0"/>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Pressed">
|
||||
<Storyboard>
|
||||
<ColorAnimation To="{DynamicResource ScrollBarLineButtonBackgroundPointerPressed}"
|
||||
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
|
||||
Duration="0"/>
|
||||
<ColorAnimation To="{DynamicResource ScrollBarLineButtonForegroundPointerPressed}"
|
||||
Storyboard.TargetName="Arrow"
|
||||
Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"
|
||||
Duration="0"/>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Disabled"/>
|
||||
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<TextBlock x:Name="Arrow"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
FontSize="8"
|
||||
Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Foreground="{DynamicResource ScrollBarLineButtonForeground}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarPageButton"
|
||||
TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="true" />
|
||||
<Setter Property="IsTabStop" Value="false" />
|
||||
<Setter Property="Focusable" Value="false" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Border Background="Transparent"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarThumb" 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="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border x:Name="Border" HorizontalAlignment="Stretch" Background="{DynamicResource ScrollBarThumbBackground}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="MouseOver">
|
||||
<Storyboard>
|
||||
<ColorAnimation To="{DynamicResource ScrollBarThumbPointerOver}"
|
||||
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
|
||||
Duration="0"
|
||||
/>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Pressed">
|
||||
<Storyboard>
|
||||
<ColorAnimation To="{DynamicResource ScrollBarThumbPressedColor}"
|
||||
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
|
||||
Duration="0"/>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Disabled"/>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
|
||||
<Grid Background="Transparent">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="MouseOver">
|
||||
<Storyboard>
|
||||
<ColorAnimation To="{DynamicResource ScrollBarBackgroundPointerOver}"
|
||||
Storyboard.TargetProperty="(Grid.Background).(SolidColorBrush.Color)"
|
||||
Duration="0"/>
|
||||
<DoubleAnimation To="16"
|
||||
Storyboard.TargetName="ScrollThumb"
|
||||
Storyboard.TargetProperty="Width"
|
||||
Duration="0:0:0.15">
|
||||
<DoubleAnimation.EasingFunction>
|
||||
<CubicEase EasingMode="EaseOut" />
|
||||
</DoubleAnimation.EasingFunction>
|
||||
</DoubleAnimation>
|
||||
|
||||
<DoubleAnimation To="1"
|
||||
Storyboard.TargetName="UpButton"
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
Duration="0:0:0.15"/>
|
||||
|
||||
<DoubleAnimation To="1"
|
||||
Storyboard.TargetName="DownButton"
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
Duration="0:0:0.15"/>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Pressed"/>
|
||||
<VisualState x:Name="Disabled"/>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition MaxHeight="16" />
|
||||
<RowDefinition Height="0.00001*" />
|
||||
<RowDefinition MaxHeight="16" />
|
||||
</Grid.RowDefinitions>
|
||||
<RepeatButton x:Name="UpButton" Opacity="0" Grid.Row="0"
|
||||
Style="{StaticResource ScrollBarLineButton}"
|
||||
Height="16"
|
||||
Command="ScrollBar.LineUpCommand"
|
||||
Content="" />
|
||||
<Track x:Name="PART_Track"
|
||||
Grid.Row="1"
|
||||
IsDirectionReversed="true">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Style="{StaticResource ScrollBarPageButton}"
|
||||
Command="ScrollBar.PageUpCommand" />
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb x:Name="ScrollThumb" HorizontalAlignment="Right" Width="4" Style="{StaticResource ScrollBarThumb}"/>
|
||||
</Track.Thumb>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Style="{StaticResource ScrollBarPageButton}"
|
||||
Command="ScrollBar.PageDownCommand" />
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
<RepeatButton x:Name="DownButton" Opacity="0" Grid.Row="2"
|
||||
Style="{StaticResource ScrollBarLineButton}"
|
||||
Height="16"
|
||||
Command="ScrollBar.LineDownCommand"
|
||||
Content="" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
|
||||
<Grid Background="Transparent">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="MouseOver">
|
||||
<Storyboard>
|
||||
<ColorAnimation To="{DynamicResource ScrollBarBackgroundPointerOver}"
|
||||
Storyboard.TargetProperty="(Grid.Background).(SolidColorBrush.Color)"
|
||||
Duration="0"/>
|
||||
<DoubleAnimation To="16"
|
||||
Storyboard.TargetName="ScrollThumb"
|
||||
Storyboard.TargetProperty="Height"
|
||||
Duration="0:0:0.15">
|
||||
<DoubleAnimation.EasingFunction>
|
||||
<CubicEase EasingMode="EaseOut" />
|
||||
</DoubleAnimation.EasingFunction>
|
||||
</DoubleAnimation>
|
||||
|
||||
<DoubleAnimation To="1"
|
||||
Storyboard.TargetName="LeftButton"
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
Duration="0:0:0.15"/>
|
||||
|
||||
<DoubleAnimation To="1"
|
||||
Storyboard.TargetName="RightButton"
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
Duration="0:0:0.15"/>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Pressed"/>
|
||||
<VisualState x:Name="Disabled"/>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MaxWidth="16" />
|
||||
<ColumnDefinition Width="0.00001*" />
|
||||
<ColumnDefinition MaxWidth="16" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<RepeatButton x:Name="LeftButton" Grid.Column="0" Opacity="0"
|
||||
Style="{StaticResource ScrollBarLineButton}"
|
||||
Width="16"
|
||||
Command="ScrollBar.LineLeftCommand"
|
||||
Content="" />
|
||||
<Track x:Name="PART_Track"
|
||||
Grid.Column="1"
|
||||
IsDirectionReversed="False">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Style="{StaticResource ScrollBarPageButton}"
|
||||
Command="ScrollBar.PageLeftCommand" />
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb x:Name="ScrollThumb" VerticalAlignment="Bottom" Height="4" Style="{StaticResource ScrollBarThumb}"/>
|
||||
</Track.Thumb>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Style="{StaticResource ScrollBarPageButton}"
|
||||
Command="ScrollBar.PageRightCommand" />
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
<RepeatButton x:Name="RightButton" Opacity="0" Grid.Column="2"
|
||||
Style="{StaticResource ScrollBarLineButton}"
|
||||
Width="16"
|
||||
Command="ScrollBar.LineRightCommand"
|
||||
Content="" />
|
||||
</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="16" />
|
||||
<Setter Property="Template"
|
||||
Value="{StaticResource HorizontalScrollBar}" />
|
||||
</Trigger>
|
||||
<Trigger Property="Orientation"
|
||||
Value="Vertical">
|
||||
<Setter Property="Width"
|
||||
Value="16" />
|
||||
<Setter Property="Height"
|
||||
Value="Auto" />
|
||||
<Setter Property="Template"
|
||||
Value="{StaticResource VerticalScrollBar}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type ScrollViewer}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ScrollContentPresenter CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" HorizontalAlignment="Stretch" Grid.ColumnSpan="2" Grid.RowSpan="2" Cursor="{TemplateBinding Cursor}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
|
||||
<ScrollBar Grid.Column="1" x:Name="PART_VerticalScrollBar"
|
||||
Value="{TemplateBinding VerticalOffset}" Maximum="{
|
||||
TemplateBinding ScrollableHeight}" ViewportSize="{
|
||||
TemplateBinding ViewportHeight}" Background="Transparent" />
|
||||
<ScrollBar Grid.Row="1" x:Name="PART_HorizontalScrollBar"
|
||||
Orientation="Horizontal" Value="{TemplateBinding
|
||||
HorizontalOffset}" Maximum="{TemplateBinding ScrollableWidth}"
|
||||
ViewportSize="{TemplateBinding ViewportWidth}"
|
||||
Background="Transparent" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--<Style x:Key="{x:Type ScrollViewer}" TargetType="{x:Type ScrollViewer}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ScrollContentPresenter Grid.ColumnSpan="2" Grid.RowSpan="2"/>
|
||||
<ScrollBar
|
||||
|
||||
Name="PART_VerticalScrollBar"
|
||||
Grid.Column="1"
|
||||
Value="{TemplateBinding VerticalOffset}"
|
||||
Maximum="{TemplateBinding ScrollableHeight}"
|
||||
ViewportSize="{TemplateBinding ViewportHeight}"
|
||||
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" />
|
||||
<ScrollBar
|
||||
|
||||
Name="PART_HorizontalScrollBar"
|
||||
Orientation="Horizontal"
|
||||
Grid.Row="1"
|
||||
Value="{TemplateBinding HorizontalOffset}"
|
||||
Maximum="{TemplateBinding ScrollableWidth}"
|
||||
ViewportSize="{TemplateBinding ViewportWidth}"
|
||||
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>-->
|
||||
</ResourceDictionary>
|
@ -1,124 +0,0 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Style x:Key="ScrollBarThumb" 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="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border x:Name="ThumbBorder" CornerRadius="2" Background="{DynamicResource ScrollBarThumbBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" HorizontalAlignment="Right" Width="4" Margin="0,0,-1,0">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates" >
|
||||
<VisualStateGroup.Transitions>
|
||||
<VisualTransition GeneratedDuration="0:0:0.15">
|
||||
<VisualTransition.GeneratedEasingFunction>
|
||||
<ExponentialEase EasingMode="EaseOut"/>
|
||||
</VisualTransition.GeneratedEasingFunction>
|
||||
</VisualTransition>
|
||||
</VisualStateGroup.Transitions>
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="MouseOver">
|
||||
<Storyboard>
|
||||
<!--<ThicknessAnimation Storyboard.TargetName="ThumbBorder" Duration="0:0:0.15" Storyboard.TargetProperty="Margin" To="0,0,0,0" />-->
|
||||
|
||||
<DoubleAnimation Storyboard.TargetName="ThumbBorder" Duration="0:0:0.15" Storyboard.TargetProperty="Width" To="16"/>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="ThumbBorder" Property="CornerRadius" Value="0" />
|
||||
<Setter TargetName="ThumbBorder" Property="Background" Value="{DynamicResource ScrollBarThumbPointerOverBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseCaptured" Value="True">
|
||||
<Setter TargetName="ThumbBorder" Property="Background" Value="{DynamicResource ScrollBarThumbPointerPressedBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
|
||||
<Grid Margin="0,1,1,1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition MaxHeight="0"/>
|
||||
<RowDefinition Height="0.00001*"/>
|
||||
<RowDefinition MaxHeight="0"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border x:Name="BackgroundBorder" Grid.RowSpan="3" CornerRadius="2" Background="Transparent" />
|
||||
<RepeatButton Grid.Row="0" Height="24" Command="ScrollBar.LineUpCommand" Content="M 0 4 L 8 4 L 4 0 Z" />
|
||||
<Track Name="PART_Track" Grid.Row="1" IsDirectionReversed="true">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Visibility="Hidden" Command="ScrollBar.PageUpCommand" />
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb Style="{StaticResource ScrollBarThumb}" Margin="1,0,1,0" Background="Red" BorderBrush="Transparent" />
|
||||
</Track.Thumb>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Visibility="Hidden" Command="ScrollBar.PageDownCommand" />
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
<RepeatButton Grid.Row="3" Height="24" Command="ScrollBar.LineDownCommand" Content="M 0 0 L 4 4 L 8 0 Z"/>
|
||||
</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="16" />
|
||||
</Trigger>
|
||||
<Trigger Property="Orientation" Value="Vertical">
|
||||
<Setter Property="Width" Value="16"/>
|
||||
<Setter Property="Height" Value="Auto" />
|
||||
<Setter Property="Template" Value="{StaticResource VerticalScrollBar}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="{x:Type ScrollViewer}" TargetType="{x:Type ScrollViewer}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ScrollContentPresenter Grid.ColumnSpan="2" Grid.RowSpan="2"/>
|
||||
<ScrollBar
|
||||
|
||||
Name="PART_VerticalScrollBar"
|
||||
Grid.Column="1"
|
||||
Value="{TemplateBinding VerticalOffset}"
|
||||
Maximum="{TemplateBinding ScrollableHeight}"
|
||||
ViewportSize="{TemplateBinding ViewportHeight}"
|
||||
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" />
|
||||
<ScrollBar
|
||||
|
||||
Name="PART_HorizontalScrollBar"
|
||||
Orientation="Horizontal"
|
||||
Grid.Row="1"
|
||||
Value="{TemplateBinding HorizontalOffset}"
|
||||
Maximum="{TemplateBinding ScrollableWidth}"
|
||||
ViewportSize="{TemplateBinding ViewportWidth}"
|
||||
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
@ -26,10 +26,21 @@
|
||||
<SolidColorBrush x:Key="ButtonBorderPressed" Color="#61FFFFFF" />
|
||||
<SolidColorBrush x:Key="ListViewItemBackgroundPointerOver" Color="#FF363636" />
|
||||
<SolidColorBrush x:Key="ControlTextBrushKey" Color="White" />
|
||||
<SolidColorBrush x:Key="SecondaryTextBrush" Color="#FF818181" />
|
||||
<SolidColorBrush x:Key="SecondaryTextForeground" Color="#FF818181" />
|
||||
<SolidColorBrush x:Key="InactiveSelectionHighlightBrushKey" Color="White" />
|
||||
<SolidColorBrush x:Key="BorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbBrush" Color="#FF7a7a7a" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbPointerOverBrush" Color="#FF767676" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbPointerPressedBrush" Color="#FFa4a4a4" />
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBarThumbBackground" Color="#FF7a7a7a" />
|
||||
<Color x:Key="ScrollBarThumbPointerOver">#FF767676</Color>
|
||||
<Color x:Key="ScrollBarThumbPointerPressed">#FFa4a4a4</Color>
|
||||
|
||||
<Color x:Key="ScrollBarBackgroundPointerOver">#FF1b1b1b</Color>
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBarLineButtonForeground">#FFcdcdcd</SolidColorBrush>
|
||||
<Color x:Key="ScrollBarLineButtonForegroundPointerOver">#FFcdcdcd</Color>
|
||||
<Color x:Key="ScrollBarLineButtonForegroundPointerPressed">#FF171717</Color>
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBarLineButtonBackground" Color="Transparent"/>
|
||||
<Color x:Key="ScrollBarLineButtonBackgroundPointerOver">#FF313131</Color>
|
||||
<Color x:Key="ScrollBarLineButtonBackgroundPointerPressed">#FFa4a4a4</Color>
|
||||
</ResourceDictionary>
|
@ -26,10 +26,21 @@
|
||||
<SolidColorBrush x:Key="ButtonBorderPressed" Color="White" />
|
||||
<SolidColorBrush x:Key="ListViewItemBackgroundPointerOver" Color="#FF003300" />
|
||||
<SolidColorBrush x:Key="ControlTextBrushKey" Color="#FFffff00" />
|
||||
<SolidColorBrush x:Key="SecondaryTextBrush" Color="#FF008000" />
|
||||
<SolidColorBrush x:Key="SecondaryTextForeground" Color="#FF008000" />
|
||||
<SolidColorBrush x:Key="InactiveSelectionHighlightBrushKey" Color="#FFFFFFFF" />
|
||||
<SolidColorBrush x:Key="BorderBrush" Color="White" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbBrush" Color="White" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbPointerOverBrush" Color="#FF008000" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbPointerPressedBrush" Color="#FF008000" />
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBarThumbBackground" Color="White" />
|
||||
<Color x:Key="ScrollBarThumbPointerOver">#FF008000</Color>
|
||||
<Color x:Key="ScrollBarThumbPointerPressed">#FF008000</Color>
|
||||
|
||||
<Color x:Key="ScrollBarBackgroundPointerOver">#FF000000</Color>
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBarLineButtonForeground">#FFFFFFFF</SolidColorBrush>
|
||||
<Color x:Key="ScrollBarLineButtonForegroundPointerOver">#FFFFFFFF</Color>
|
||||
<Color x:Key="ScrollBarLineButtonForegroundPointerPressed">#FFFFFFFF</Color>
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBarLineButtonBackground" Color="Black"/>
|
||||
<Color x:Key="ScrollBarLineButtonBackgroundPointerOver">#FF000000</Color>
|
||||
<Color x:Key="ScrollBarLineButtonBackgroundPointerPressed">#FF000000</Color>
|
||||
</ResourceDictionary>
|
@ -26,10 +26,21 @@
|
||||
<SolidColorBrush x:Key="ButtonBorderPressed" Color="#FFFFFFFF" />
|
||||
<SolidColorBrush x:Key="ListViewItemBackgroundPointerOver" Color="#FF0000ff" />
|
||||
<SolidColorBrush x:Key="ControlTextBrushKey" Color="#FF00ff00" />
|
||||
<SolidColorBrush x:Key="SecondaryTextBrush" Color="#FFc0c0c0" />
|
||||
<SolidColorBrush x:Key="SecondaryTextForeground" Color="#FFc0c0c0" />
|
||||
<SolidColorBrush x:Key="InactiveSelectionHighlightBrushKey" Color="#FFFFFFFF" />
|
||||
<SolidColorBrush x:Key="BorderBrush" Color="White" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbBrush" Color="White" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbPointerOverBrush" Color="#FF0000ff" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbPointerPressedBrush" Color="#FF0000ff" />
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBarThumbBackground" Color="White" />
|
||||
<Color x:Key="ScrollBarThumbPointerOver">#FF0000ff</Color>
|
||||
<Color x:Key="ScrollBarThumbPointerPressed">#FF0000ff</Color>
|
||||
|
||||
<Color x:Key="ScrollBarBackgroundPointerOver">#FF000000</Color>
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBarLineButtonForeground">#FFFFFFFF</SolidColorBrush>
|
||||
<Color x:Key="ScrollBarLineButtonForegroundPointerOver">#FFFFFFFF</Color>
|
||||
<Color x:Key="ScrollBarLineButtonForegroundPointerPressed">#FFFFFFFF</Color>
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBarLineButtonBackground" Color="Transparent"/>
|
||||
<Color x:Key="ScrollBarLineButtonBackgroundPointerOver">#FF000000</Color>
|
||||
<Color x:Key="ScrollBarLineButtonBackgroundPointerPressed">#FF000000</Color>
|
||||
</ResourceDictionary>
|
@ -26,10 +26,21 @@
|
||||
<SolidColorBrush x:Key="ButtonBorderPressed" Color="#61FFFFFF" />
|
||||
<SolidColorBrush x:Key="ListViewItemBackgroundPointerOver" Color="#FF0ca7b6" />
|
||||
<SolidColorBrush x:Key="ControlTextBrushKey" Color="White" />
|
||||
<SolidColorBrush x:Key="SecondaryTextBrush" Color="#FF3ff23f" />
|
||||
<SolidColorBrush x:Key="SecondaryTextForeground" Color="#FF3ff23f" />
|
||||
<SolidColorBrush x:Key="InactiveSelectionHighlightBrushKey" Color="White" />
|
||||
<SolidColorBrush x:Key="BorderBrush" Color="White" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbBrush" Color="White" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbPointerOverBrush" Color="#FF0ca7b6" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbPointerPressedBrush" Color="#FF0ca7b6" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbBackground" Color="White" />
|
||||
<Color x:Key="ScrollBarThumbPointerOver">#FF0ca7b6</Color>
|
||||
<Color x:Key="ScrollBarThumbPointerPressed">#FF0ca7b6</Color>
|
||||
|
||||
<Color x:Key="ScrollBarBackgroundPointerOver">#FF000000</Color>
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBarLineButtonForeground">#FFFFFFFF</SolidColorBrush>
|
||||
<Color x:Key="ScrollBarLineButtonForegroundPointerOver">#FFFFFFFF</Color>
|
||||
<Color x:Key="ScrollBarLineButtonForegroundPointerPressed">#FFFFFFFF</Color>
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBarLineButtonBackground" Color="Transparent"/>
|
||||
<Color x:Key="ScrollBarLineButtonBackgroundPointerOver">#FF000000</Color>
|
||||
<Color x:Key="ScrollBarLineButtonBackgroundPointerPressed">#FF000000</Color>
|
||||
|
||||
</ResourceDictionary>
|
@ -26,10 +26,20 @@
|
||||
<SolidColorBrush x:Key="ButtonBorderPressed" Color="#FF37006e" />
|
||||
<SolidColorBrush x:Key="ListViewItemBackgroundPointerOver" Color="#FF9a59db" />
|
||||
<SolidColorBrush x:Key="ControlTextBrushKey" Color="Black" />
|
||||
<SolidColorBrush x:Key="SecondaryTextBrush" Color="#FF600000" />
|
||||
<SolidColorBrush x:Key="SecondaryTextForeground" Color="#FF600000" />
|
||||
<SolidColorBrush x:Key="InactiveSelectionHighlightBrushKey" Color="Black" />
|
||||
<SolidColorBrush x:Key="BorderBrush" Color="Black" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbBrush" Color="Black" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbPointerOverBrush" Color="#FF9a59db" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbPointerPressedBrush" Color="#FF9a59db" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbBackground" Color="Black" />
|
||||
<Color x:Key="ScrollBarThumbPointerOver">#FF9a59db</Color>
|
||||
<Color x:Key="ScrollBarThumbPointerPressed">#FF9a59db</Color>
|
||||
|
||||
<Color x:Key="ScrollBarBackgroundPointerOver">#FFf0f0f0</Color>
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBarLineButtonForeground">#FF000000</SolidColorBrush>
|
||||
<Color x:Key="ScrollBarLineButtonForegroundPointerOver">#FF000000</Color>
|
||||
<Color x:Key="ScrollBarLineButtonForegroundPointerPressed">#FF000000</Color>
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBarLineButtonBackground" Color="Transparent"/>
|
||||
<Color x:Key="ScrollBarLineButtonBackgroundPointerOver">#FF000000</Color>
|
||||
<Color x:Key="ScrollBarLineButtonBackgroundPointerPressed">#FF000000</Color>
|
||||
</ResourceDictionary>
|
@ -26,10 +26,20 @@
|
||||
<SolidColorBrush x:Key="ButtonBorderPressed" Color="#61000000" />
|
||||
<SolidColorBrush x:Key="ListViewItemBackgroundPointerOver" Color="#FFd2d2d2" />
|
||||
<SolidColorBrush x:Key="ControlTextBrushKey" Color="Black" />
|
||||
<SolidColorBrush x:Key="SecondaryTextBrush" Color="#FF5b5b5b" />
|
||||
<SolidColorBrush x:Key="SecondaryTextForeground" Color="#FF5b5b5b" />
|
||||
<SolidColorBrush x:Key="InactiveSelectionHighlightBrushKey" Color="Black" />
|
||||
<SolidColorBrush x:Key="BorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbBrush" Color="#FF7a7a7a" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbPointerOverBrush" Color="#FFa0a0a0" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbPointerPressedBrush" Color="#FF747474" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbBackground" Color="#FF7a7a7a" />
|
||||
<Color x:Key="ScrollBarThumbPointerOver">#FFa0a0a0</Color>
|
||||
<Color x:Key="ScrollBarThumbPointerPressed">#FF747474</Color>
|
||||
|
||||
<Color x:Key="ScrollBarBackgroundPointerOver">#FFf0f0f0</Color>
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBarLineButtonForeground">#FF1d1d1d</SolidColorBrush>
|
||||
<Color x:Key="ScrollBarLineButtonForegroundPointerOver">#FF1d1d1d</Color>
|
||||
<Color x:Key="ScrollBarLineButtonForegroundPointerPressed">#FFf3f3f3</Color>
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBarLineButtonBackground" Color="Transparent"/>
|
||||
<Color x:Key="ScrollBarLineButtonBackgroundPointerOver">#FFd2d2d2</Color>
|
||||
<Color x:Key="ScrollBarLineButtonBackgroundPointerPressed">#FF5d5d5d</Color>
|
||||
</ResourceDictionary>
|
Loading…
Reference in New Issue
Block a user