|
@@ -0,0 +1,95 @@
|
|
|
+<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
+ xmlns:animations="clr-namespace:PixiEditor.AvaloniaUI.Views.Animations">
|
|
|
+
|
|
|
+ <ControlTheme x:Key="SliderRepeatTrackTheme"
|
|
|
+ TargetType="RepeatButton">
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate TargetType="RepeatButton">
|
|
|
+ <Border Background="Transparent"></Border>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </ControlTheme>
|
|
|
+
|
|
|
+ <ControlTheme x:Key="{x:Type animations:TimelineSlider}"
|
|
|
+ TargetType="animations:TimelineSlider">
|
|
|
+ <Style Selector="^:horizontal">
|
|
|
+ <Setter Property="MinWidth" Value="40" />
|
|
|
+ <Setter Property="MinHeight" Value="20" />
|
|
|
+ <Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
|
|
+ <Setter Property="Template">
|
|
|
+ <ControlTemplate>
|
|
|
+ <Grid Name="grid">
|
|
|
+ <Border Margin="6, 0" CornerRadius="4" Background="{DynamicResource ThemeControlLowBrush}"
|
|
|
+ Height="6"
|
|
|
+ VerticalAlignment="Center">
|
|
|
+ </Border>
|
|
|
+ <Canvas Margin="-6,-1">
|
|
|
+ <Rectangle IsVisible="false" x:Name="PART_SelectionRange" Height="4.0"
|
|
|
+ StrokeThickness="1.0" />
|
|
|
+ </Canvas>
|
|
|
+ <TickBar
|
|
|
+ Name="TopTickBar"
|
|
|
+ Ticks="{TemplateBinding Ticks}"
|
|
|
+ TickFrequency="{TemplateBinding Slider.TickFrequency}"
|
|
|
+ Orientation="{TemplateBinding Slider.Orientation}"
|
|
|
+ Minimum="{TemplateBinding Slider.Minimum}"
|
|
|
+ Maximum="{TemplateBinding Slider.Maximum}"
|
|
|
+ Height="15"
|
|
|
+ Margin="0,0,0,4"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Placement="Top"
|
|
|
+ Fill="{DynamicResource ThemeBackgroundBrush2}" />
|
|
|
+ <Track Name="PART_Track"
|
|
|
+ Grid.Row="1"
|
|
|
+ IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <Track.DecreaseButton>
|
|
|
+ <RepeatButton Name="PART_DecreaseButton"
|
|
|
+ Theme="{StaticResource SliderRepeatTrackTheme}" />
|
|
|
+ </Track.DecreaseButton>
|
|
|
+ <Track.IncreaseButton>
|
|
|
+ <RepeatButton Name="PART_IncreaseButton"
|
|
|
+ Theme="{StaticResource SliderRepeatTrackTheme}" />
|
|
|
+ </Track.IncreaseButton>
|
|
|
+ <Thumb Name="thumb"
|
|
|
+ MinWidth="20"
|
|
|
+ MinHeight="20">
|
|
|
+ <Thumb.Template>
|
|
|
+ <ControlTemplate>
|
|
|
+ <Border Background="{DynamicResource ThemeAccentBrush}" Width="20"
|
|
|
+ Height="18"
|
|
|
+ CornerRadius="4">
|
|
|
+ <TextBlock
|
|
|
+ Text="{Binding Value, RelativeSource={RelativeSource FindAncestor, AncestorType=animations:TimelineSlider}}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </Border>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Thumb.Template>
|
|
|
+ </Thumb>
|
|
|
+ </Track>
|
|
|
+ </Grid>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <Style Selector="^ /template/ Track#PART_Track">
|
|
|
+ <Setter Property="Minimum" Value="{TemplateBinding Minimum}" />
|
|
|
+ <Setter Property="Maximum" Value="{TemplateBinding Maximum}" />
|
|
|
+ <Setter Property="Value" Value="{TemplateBinding Value, Mode=TwoWay}" />
|
|
|
+ </Style>
|
|
|
+ <Style Selector="^ /template/ Border#TrackBackground">
|
|
|
+ <Setter Property="BorderThickness" Value="2" />
|
|
|
+ <Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderLowBrush}" />
|
|
|
+ </Style>
|
|
|
+ <Style Selector="^ /template/ TickBar">
|
|
|
+ <Setter Property="Ticks" Value="{TemplateBinding Ticks}" />
|
|
|
+ </Style>
|
|
|
+ <Style Selector="^:disabled /template/ Grid#grid">
|
|
|
+ <Setter Property="Opacity" Value="{DynamicResource ThemeDisabledOpacity}" />
|
|
|
+ </Style>
|
|
|
+ </ControlTheme>
|
|
|
+</ResourceDictionary>
|