You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
4.7 KiB
71 lines
4.7 KiB
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:Microsoft.Windows.Controls"
|
|
xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes"
|
|
xmlns:themes="clr-namespace:Microsoft.Windows.Controls.Themes">
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="../../Themes/Generic/Glyphs.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
<!-- =============================================================================== -->
|
|
<!-- ButtonSpinner -->
|
|
<!-- =============================================================================== -->
|
|
|
|
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
|
|
|
<Style TargetType="{x:Type local:ButtonSpinner}">
|
|
<Setter Property="Background" Value="{DynamicResource {x:Static themes:ResourceKeys.ControlNormalBackgroundKey}}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ControlNormalBorderKey}}" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="Focusable" Value="False" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="IsTabStop" Value="True" />
|
|
<Setter Property="Padding" Value="2" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type local:ButtonSpinner}">
|
|
<Grid SnapsToDevicePixels="True">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" />
|
|
|
|
<ContentPresenter Focusable="False" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
|
|
|
<Grid Grid.Column="1" Visibility="{TemplateBinding ShowButtonSpinner, Converter={StaticResource BooleanToVisibilityConverter}}" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<RepeatButton x:Name="PART_IncreaseButton"
|
|
Style="{DynamicResource {x:Static themes:ResourceKeys.SpinnerButtonStyleKey}}"
|
|
IsTabStop="{TemplateBinding IsTabStop}" ContentTemplate="{StaticResource IncreaseGlyphNormalKey}" />
|
|
|
|
<RepeatButton x:Name="PART_DecreaseButton" Grid.Row="1"
|
|
Style="{DynamicResource {x:Static themes:ResourceKeys.SpinnerButtonStyleKey}}"
|
|
IsTabStop="{TemplateBinding IsTabStop}" ContentTemplate="{StaticResource DecreaseGlyphNormalKey}" />
|
|
|
|
</Grid>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Background" Value="{DynamicResource {x:Static themes:ResourceKeys.ControlDisabledBackgroundKey}}" />
|
|
</Trigger>
|
|
<Trigger SourceName="PART_IncreaseButton" Property="IsEnabled" Value="False">
|
|
<Setter TargetName="PART_IncreaseButton" Property="ContentTemplate" Value="{StaticResource IncreaseGlyphDisabledKey}" />
|
|
</Trigger>
|
|
<Trigger SourceName="PART_DecreaseButton" Property="IsEnabled" Value="False">
|
|
<Setter TargetName="PART_DecreaseButton" Property="ContentTemplate" Value="{StaticResource DecreaseGlyphDisabledKey}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</ResourceDictionary>
|