<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <SolidColorBrush x:Key="HorizontalSliderTrackNormalBackground" Color="#FFE7EAEA" /> <Style x:Key="SliderRepeatButtonStyle" TargetType="{x:Type RepeatButton}"> <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}"> <Grid> <Canvas ClipToBounds="True"> <Border Canvas.Left="16" Canvas.Bottom="0" Width="4" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="6" Width="2" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="12" Width="4" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="18" Width="2" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="24" Width="4" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="30" Width="2" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="36" Width="4" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="42" Width="2" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="48" Width="4" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="54" Width="2" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="60" Width="4" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="66" Width="2" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="72" Width="4" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="78" Width="2" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="84" Width="4" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="90" Width="2" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="96" Width="4" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="102" Width="2" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="108" Width="4" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="114" Width="2" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="120" Width="4" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="126" Width="2" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="132" Width="4" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="138" Width="2" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="144" Width="4" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> <Border Canvas.Left="16" Canvas.Bottom="148" Width="2" Height="1" VerticalAlignment="Bottom" Background="#258ACA" /> </Canvas> <Border Width="1" Background="#258ACA" /> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="SliderRepeatButtonStyle1" TargetType="{x:Type RepeatButton}"> <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}"> <Grid> <Border Width="1" Background="#b1b1b1" /> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="HorizontalSliderThumbStyle" TargetType="{x:Type Thumb}"> <Setter Property="Focusable" Value="false" /> <Setter Property="OverridesDefaultStyle" Value="true" /> <Setter Property="Height" Value="6" /> <Setter Property="Width" Value="30" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Thumb}"> <Border Width="16" Height="6" Background="#258ACA"> <Canvas x:Name="canvas"> <Border Canvas.Left="25" Canvas.Top="-12" Width="36" Height="32"> <Border.Background> <ImageBrush ImageSource="/PipeGallery;component/Image/ty_tips.png" /> </Border.Background> <TextBlock Margin="2,0,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Text="{Binding Path=Value}" /> </Border> </Canvas> </Border> <ControlTemplate.Triggers> <!--<Trigger Property="IsDragging" Value="true"> <Setter TargetName="canvas" Property="Visibility" Value="Visible" /> </Trigger> <Trigger Property="IsDragging" Value="false"> <Setter TargetName="canvas" Property="Visibility" Value="Collapsed"/> </Trigger>--> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="SliderStyle" TargetType="{x:Type Slider}"> <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="Foreground" Value="#FFC4C4C4" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Slider}"> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" MinWidth="{TemplateBinding MinHeight}" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Canvas Grid.ColumnSpan="3" Height="150" ClipToBounds="True"> <Border Canvas.Left="16" Canvas.Bottom="0" Width="4" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="6" Width="2" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="12" Width="4" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="18" Width="2" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="24" Width="4" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="30" Width="2" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="36" Width="4" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="42" Width="2" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="48" Width="4" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="54" Width="2" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="60" Width="4" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="66" Width="2" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="72" Width="4" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="78" Width="2" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="84" Width="4" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="90" Width="2" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="96" Width="4" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="102" Width="2" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="108" Width="4" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="114" Width="2" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="120" Width="4" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="126" Width="2" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="132" Width="4" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="138" Width="2" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="144" Width="4" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> <Border Canvas.Left="16" Canvas.Bottom="150" Width="2" Height="1" VerticalAlignment="Bottom" Background="#b1b1b1" /> </Canvas> <TickBar x:Name="TopTick" Grid.Column="0" Fill="{TemplateBinding Foreground}" Placement="Top" Visibility="Collapsed" /> <TickBar x:Name="BottomTick" Grid.Column="2" Fill="{TemplateBinding Foreground}" Placement="Bottom" Visibility="Collapsed" /> <Border x:Name="TrackBackground" Grid.Column="1" Margin="5,0" VerticalAlignment="center" Background="Transparent" BorderBrush="Transparent" BorderThickness="0.5" CornerRadius="1"> <Canvas Margin="-6,-1"> <Rectangle x:Name="PART_SelectionRange" Stroke="red" StrokeThickness="0.5" Visibility="Hidden" /> </Canvas> </Border> <Track x:Name="PART_Track" Grid.Column="1"> <Track.IncreaseRepeatButton> <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle1}" /> </Track.IncreaseRepeatButton> <Track.DecreaseRepeatButton> <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}" /> </Track.DecreaseRepeatButton> <Track.Thumb> <Thumb x:Name="Thumb" Style="{StaticResource HorizontalSliderThumbStyle}" /> </Track.Thumb> </Track> </Grid> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary>