|
@@ -1,156 +0,0 @@
|
|
|
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
- xmlns:local="clr-namespace:PixiEditor.Helpers.UI">
|
|
|
-
|
|
|
- <Style x:Key="RepeatButtonTransparent" TargetType="{x:Type RepeatButton}">
|
|
|
- <Setter Property="OverridesDefaultStyle" Value="true" />
|
|
|
- <Setter Property="Background" Value="Transparent" />
|
|
|
- <Setter Property="Focusable" Value="false" />
|
|
|
- <Setter Property="IsTabStop" Value="false" />
|
|
|
- <Setter Property="Template">
|
|
|
- <Setter.Value>
|
|
|
- <ControlTemplate TargetType="{x:Type RepeatButton}">
|
|
|
- <Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}"
|
|
|
- Width="{TemplateBinding Width}" />
|
|
|
- </ControlTemplate>
|
|
|
- </Setter.Value>
|
|
|
- </Setter>
|
|
|
- </Style>
|
|
|
- <SolidColorBrush x:Key="SliderThumb.Static.Background" Color="#FFF0F0F0" />
|
|
|
- <SolidColorBrush x:Key="SliderThumb.Static.Border" Color="White" />
|
|
|
- <SolidColorBrush x:Key="SliderThumb.MouseOver.Background" Color="#FFDCECFC" />
|
|
|
- <SolidColorBrush x:Key="SliderThumb.MouseOver.Border" Color="#FF7Eb4EA" />
|
|
|
- <SolidColorBrush x:Key="SliderThumb.Pressed.Background" Color="#FFDAECFC" />
|
|
|
- <SolidColorBrush x:Key="SliderThumb.Pressed.Border" Color="#FF569DE5" />
|
|
|
- <SolidColorBrush x:Key="SliderThumb.Disabled.Background" Color="#FFF0F0F0" />
|
|
|
- <SolidColorBrush x:Key="SliderThumb.Disabled.Border" Color="#FFD9D9D9" />
|
|
|
- <SolidColorBrush x:Key="SliderThumb.Track.Background" Color="#FFE7EAEA" />
|
|
|
- <SolidColorBrush x:Key="SliderThumb.Track.Border" Color="#FFD6D6D6" />
|
|
|
- <ControlTemplate x:Key="SliderThumbHorizontalDefault" TargetType="{x:Type Thumb}">
|
|
|
- <Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center">
|
|
|
- <Ellipse x:Name="grip" Width="12" Height="12" ClipToBounds="False">
|
|
|
- <Ellipse.Fill>
|
|
|
- <ImageBrush ImageSource="../Images/ColorCircle.png" />
|
|
|
- </Ellipse.Fill>
|
|
|
- </Ellipse>
|
|
|
- </Grid>
|
|
|
- <ControlTemplate.Triggers>
|
|
|
- <Trigger Property="IsEnabled" Value="false">
|
|
|
- <Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Background}" />
|
|
|
- <Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Border}" />
|
|
|
- </Trigger>
|
|
|
- </ControlTemplate.Triggers>
|
|
|
- </ControlTemplate>
|
|
|
- <ControlTemplate x:Key="SliderThumbHorizontalTop" TargetType="{x:Type Thumb}">
|
|
|
- <Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center">
|
|
|
- <Ellipse x:Name="grip" Width="12" Height="12" ClipToBounds="False">
|
|
|
- <Ellipse.Fill>
|
|
|
- <ImageBrush ImageSource="../Images/ColorCircle.png" />
|
|
|
- </Ellipse.Fill>
|
|
|
- </Ellipse>
|
|
|
- </Grid>
|
|
|
- <ControlTemplate.Triggers>
|
|
|
- <Trigger Property="IsMouseOver" Value="true">
|
|
|
- <Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Background}" />
|
|
|
- <Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Border}" />
|
|
|
- </Trigger>
|
|
|
- <Trigger Property="IsDragging" Value="true">
|
|
|
- <Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Background}" />
|
|
|
- <Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Border}" />
|
|
|
- </Trigger>
|
|
|
- <Trigger Property="IsEnabled" Value="false">
|
|
|
- <Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Background}" />
|
|
|
- <Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Border}" />
|
|
|
- </Trigger>
|
|
|
- </ControlTemplate.Triggers>
|
|
|
- </ControlTemplate>
|
|
|
- <ControlTemplate x:Key="SliderThumbHorizontalBottom" TargetType="{x:Type Thumb}">
|
|
|
- <Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center">
|
|
|
- <Path x:Name="grip" Data="M -1,0 A 1,1 0 1 1 1,0 M -1,0 A 1,1 0 1 0 1,0"
|
|
|
- Fill="{StaticResource SliderThumb.Static.Background}" SnapsToDevicePixels="True" StrokeThickness="1"
|
|
|
- Stretch="Fill" Stroke="{StaticResource SliderThumb.Static.Border}" UseLayoutRounding="True"
|
|
|
- VerticalAlignment="Center" />
|
|
|
- </Grid>
|
|
|
- <ControlTemplate.Triggers>
|
|
|
- <Trigger Property="IsMouseOver" Value="true">
|
|
|
- <Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Background}" />
|
|
|
- <Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Border}" />
|
|
|
- </Trigger>
|
|
|
- <Trigger Property="IsDragging" Value="true">
|
|
|
- <Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Background}" />
|
|
|
- <Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Border}" />
|
|
|
- </Trigger>
|
|
|
- <Trigger Property="IsEnabled" Value="false">
|
|
|
- <Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Background}" />
|
|
|
- <Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Border}" />
|
|
|
- </Trigger>
|
|
|
- </ControlTemplate.Triggers>
|
|
|
- </ControlTemplate>
|
|
|
- <ControlTemplate x:Key="RgbColorSliderTemplate1" TargetType="{x:Type Slider}">
|
|
|
- <Border x:Name="border" CornerRadius="5" Background="{TemplateBinding Background}"
|
|
|
- BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
- SnapsToDevicePixels="True">
|
|
|
- <Grid>
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="Auto" />
|
|
|
- <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}" />
|
|
|
- <RowDefinition Height="Auto" />
|
|
|
- </Grid.RowDefinitions>
|
|
|
- <TickBar x:Name="TopTick" Fill="{TemplateBinding Foreground}" Height="4" Margin="0,0,0,2"
|
|
|
- Placement="Top" Grid.Row="0" Visibility="Collapsed" />
|
|
|
- <TickBar x:Name="BottomTick" Fill="{TemplateBinding Foreground}" Height="4" Margin="0,2,0,0"
|
|
|
- Placement="Bottom" Grid.Row="2" Visibility="Collapsed" />
|
|
|
- <Border x:Name="TrackBackground" Background="Transparent" BorderThickness="0" Height="0" Margin="5,0"
|
|
|
- Grid.Row="1" VerticalAlignment="center">
|
|
|
- <Canvas Margin="-6,-1">
|
|
|
- <Rectangle x:Name="PART_SelectionRange"
|
|
|
- Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Height="4.0"
|
|
|
- Visibility="Hidden" />
|
|
|
- </Canvas>
|
|
|
- </Border>
|
|
|
- <Track x:Name="PART_Track" Grid.Row="1">
|
|
|
- <Track.DecreaseRepeatButton>
|
|
|
- <RepeatButton Command="{x:Static Slider.DecreaseLarge}"
|
|
|
- Style="{StaticResource RepeatButtonTransparent}" />
|
|
|
- </Track.DecreaseRepeatButton>
|
|
|
- <Track.IncreaseRepeatButton>
|
|
|
- <RepeatButton Command="{x:Static Slider.IncreaseLarge}"
|
|
|
- Style="{StaticResource RepeatButtonTransparent}" />
|
|
|
- </Track.IncreaseRepeatButton>
|
|
|
- <Track.Thumb>
|
|
|
- <Thumb x:Name="Thumb" Focusable="False" Height="12" OverridesDefaultStyle="True"
|
|
|
- Template="{StaticResource SliderThumbHorizontalDefault}" VerticalAlignment="Center"
|
|
|
- Width="12" />
|
|
|
- </Track.Thumb>
|
|
|
- </Track>
|
|
|
- </Grid>
|
|
|
- </Border>
|
|
|
- <ControlTemplate.Triggers>
|
|
|
- <Trigger Property="TickPlacement" Value="TopLeft">
|
|
|
- <Setter Property="Visibility" TargetName="TopTick" Value="Visible" />
|
|
|
- <Setter Property="Template" TargetName="Thumb" Value="{StaticResource SliderThumbHorizontalTop}" />
|
|
|
- <Setter Property="Margin" TargetName="TrackBackground" Value="5,2,5,0" />
|
|
|
- </Trigger>
|
|
|
- <Trigger Property="TickPlacement" Value="BottomRight">
|
|
|
- <Setter Property="Visibility" TargetName="BottomTick" Value="Visible" />
|
|
|
- <Setter Property="Template" TargetName="Thumb" Value="{StaticResource SliderThumbHorizontalBottom}" />
|
|
|
- <Setter Property="Margin" TargetName="TrackBackground" Value="5,0,5,2" />
|
|
|
- </Trigger>
|
|
|
- <Trigger Property="TickPlacement" Value="Both">
|
|
|
- <Setter Property="Visibility" TargetName="TopTick" Value="Visible" />
|
|
|
- <Setter Property="Visibility" TargetName="BottomTick" Value="Visible" />
|
|
|
- </Trigger>
|
|
|
- <Trigger Property="IsSelectionRangeEnabled" Value="true">
|
|
|
- <Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible" />
|
|
|
- </Trigger>
|
|
|
- <Trigger Property="IsKeyboardFocused" Value="true">
|
|
|
- <Setter Property="Foreground" TargetName="Thumb" Value="Blue" />
|
|
|
- </Trigger>
|
|
|
- </ControlTemplate.Triggers>
|
|
|
- </ControlTemplate>
|
|
|
-
|
|
|
- <Style TargetType="{x:Type local:RgbColorSlider}">
|
|
|
- <Setter Property="Template" Value="{StaticResource RgbColorSliderTemplate1}" />
|
|
|
- </Style>
|
|
|
-
|
|
|
-</ResourceDictionary>
|