<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:hc="clr-namespace:HandyControl.Controls"
                    xmlns:themes="clr-namespace:HandyControl.Themes">

    <ResourceDictionary.MergedDictionaries>
        <themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Converters.xaml"/>
        <themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Button.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="hc:TimeBar">
        <Setter Property="HotspotsBrush" Value="{DynamicResource AccentBrush}"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="BorderThickness" Value="0,1,0,0"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="Background" Value="{DynamicResource TitleBrush}"/>
        <Setter Property="Height" Value="60"/>
        <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="hc:TimeBar">
                    <ControlTemplate.Triggers>
                        <EventTrigger RoutedEvent="FrameworkElement.MouseEnter">
                            <BeginStoryboard>
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PART_TextBlockMove">
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="FrameworkElement.MouseLeave">
                            <BeginStoryboard>
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PART_TextBlockMove">
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                    </ControlTemplate.Triggers>
                    <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
                        <hc:SimplePanel ClipToBounds="True">
                            <Border BorderThickness="0,0,0,4" BorderBrush="White" VerticalAlignment="Top" Height="52">
                                <TextBlock FontSize="16" Name="PART_TextBlockSelected" VerticalAlignment="Top" Margin="0,14,0,0" HorizontalAlignment="Center"/>
                            </Border>
                            <TextBlock Visibility="{TemplateBinding ShowSpeStr,Converter={StaticResource Boolean2VisibilityConverter}}" Text="{TemplateBinding SpeStr}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,14,10,0"/>
                            <TextBlock Visibility="Collapsed" Name="PART_TextBlockMove" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,2,0,0"/>
                            <Canvas Name="PART_CanvasSpe" VerticalAlignment="Bottom" Height="28"/>
                            <hc:SimplePanel x:Name="PART_Hotspots" Margin="0,48,0,0" VerticalAlignment="Top" Visibility="{Binding Hotspots,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Object2VisibilityConverter}}"/>
                            <Border Width="1" Background="{DynamicResource DangerBrush}"/>
                            <Border Name="PART_BorderTop" Background="Transparent" Cursor="Hand"/>
                        </hc:SimplePanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>