<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:HeBianGu.WPF.EChart">

    <!--左向右渐显示动画-->
    <Storyboard x:Key="Story_OpacityLeftToRight">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)">
            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
            <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
        </DoubleAnimationUsingKeyFrames>

        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-50"/>
            <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <!--左向右渐显示动画-->
    <Storyboard x:Key="Story_LeftToRight">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)">
            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
            <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
        </DoubleAnimationUsingKeyFrames>

        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-425"/>
            <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <!--左向右渐显示动画-->
    <Storyboard x:Key="Story_UpToDown">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)">
            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
            <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
        </DoubleAnimationUsingKeyFrames>

        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-425"/>
            <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>


    <!--左向右渐显示动画-->
    <Storyboard x:Key="Story_DownToUp">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)">
            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
            <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
        </DoubleAnimationUsingKeyFrames>

        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="425"/>
            <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <!--X方向缩放显示动画-->
    <Storyboard x:Key="Story_ScaleX">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"  Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
            <SplineDoubleKeyFrame KeyTime="00:00:00.5" Value="0"/>
            <SplineDoubleKeyFrame KeySpline="0,0.500999987125397,0.504000008106232,1" KeyTime="00:00:01.5" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <!--X方向缩放显示动画-->
    <Storyboard x:Key="Story_ScaleXY">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"  Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
            <SplineDoubleKeyFrame KeyTime="00:00:00.5" Value="0"/>
            <SplineDoubleKeyFrame KeySpline="0,0.500999987125397,0.504000008106232,1" KeyTime="00:00:01.5" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <!--Y方向缩放显示动画-->
    <Storyboard x:Key="Story_ScaleY">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"  Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
            <SplineDoubleKeyFrame KeySpline="0,0.500999987125397,0.504000008106232,1" KeyTime="00:00:01" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <!--地图-->
    <Style TargetType="{x:Type Path}" x:Key="path">
        <Setter Property="StrokeThickness" Value="1"/>
        <Setter Property="Stroke">
            <Setter.Value>
                <LinearGradientBrush  StartPoint ="0,0"  EndPoint ="0,1" >
                    <GradientStop  Color ="Blue"  Offset ="0.8" ></GradientStop>
                    <GradientStop  Color ="Green"  Offset ="0.6" ></GradientStop>
                    <GradientStop  Color ="Yellow"  Offset ="0.4" ></GradientStop>
                    <GradientStop  Color ="Red"  Offset ="0.2" ></GradientStop>
                    <GradientStop  Color ="Purple"  Offset ="0" ></GradientStop>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <!--<Setter Property="Stroke" Value="#FF1313F0"/>-->
                <Setter Property="StrokeThickness" Value="2"/>
            </Trigger>


            <EventTrigger RoutedEvent="Loaded">
                <BeginStoryboard Storyboard="{StaticResource Story_UpToDown}" />
            </EventTrigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="{x:Type Path}" x:Key="DefaultCurvePath">
        <Setter Property="StrokeThickness" Value="1"/>
        <Setter Property="Stroke">
            <Setter.Value>
                <LinearGradientBrush  StartPoint ="0,0"  EndPoint ="0,1" >
                    <GradientStop  Color ="Red"  Offset ="1" ></GradientStop>
                    <GradientStop  Color ="Green"  Offset ="0.6" ></GradientStop>
                    <GradientStop  Color ="Green"  Offset ="0.3" ></GradientStop>
                    <GradientStop  Color ="Red"  Offset ="0" ></GradientStop>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <!--<Setter Property="Stroke" Value="#FF1313F0"/>-->
                <Setter Property="StrokeThickness" Value="2"/>
            </Trigger>


            <EventTrigger RoutedEvent="Loaded">
                <BeginStoryboard Storyboard="{StaticResource Story_UpToDown}" />
            </EventTrigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="{x:Type Shape}" x:Key="DefaultMarker">
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="StrokeThickness" Value="2"/>
            </Trigger>

            <EventTrigger RoutedEvent="Loaded">
                <BeginStoryboard Storyboard="{StaticResource Story_UpToDown}" />
            </EventTrigger>
        </Style.Triggers>
    </Style>

    <!--圆圈-->
    <Style TargetType="{x:Type Ellipse}" x:Key="ellipse">
        <Setter Property="Width" Value="5"/>
        <Setter Property="Height" Value="5"/>
        <Setter Property="Fill" Value="Blue"/>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Setter.Value>
        </Setter>

        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <!--<Setter Property="Stroke" Value="#FF1313F0"/>-->
                <!--<Setter Property="StrokeThickness" Value="2"/>-->
                <Setter Property="Stroke" Value="Red"/>
            </Trigger>


            <EventTrigger RoutedEvent="Loaded">
                <BeginStoryboard Storyboard="{StaticResource Story_LeftToRight}" />
            </EventTrigger>
        </Style.Triggers>
    </Style>

    <!--箭头-->
    <Style TargetType="{x:Type Path}" x:Key="pathTrangle">
        <Setter Property="StrokeThickness" Value="1"/>
        <Setter Property="Data">
            <Setter.Value>
                <PathGeometry>
                    <PathFigure StartPoint="0,0">
                        <PolyLineSegment Points="100,20 0,40 30,20 0,0"></PolyLineSegment>
                    </PathFigure>
                </PathGeometry>
            </Setter.Value>
        </Setter>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <!--<Setter Property="Stroke" Value="#FF1313F0"/>-->
                <Setter Property="StrokeThickness" Value="2"/>
            </Trigger>


            <EventTrigger RoutedEvent="Loaded">
                <BeginStoryboard Storyboard="{StaticResource Story_LeftToRight}" />
            </EventTrigger>
        </Style.Triggers>
    </Style>

    <!--实线线样式-->
    <Style TargetType="{x:Type Line}" x:Key="line">
        <Setter Property="Stroke" Value="Black"/>
        <Setter Property="StrokeThickness" Value="0.2"/>
        <!--<Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Setter.Value>
        </Setter>-->

        <!--<Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                --><!--<Setter Property="Stroke" Value="#FF1313F0"/>--><!--
                <Setter Property="StrokeThickness" Value="1"/>
            </Trigger>
            <EventTrigger RoutedEvent="Loaded">
                <BeginStoryboard Storyboard="{StaticResource Story_ScaleY}" />
            </EventTrigger>
        </Style.Triggers>-->
    </Style>

    <!--虚线线样式-->
    <Style TargetType="{x:Type Line}" x:Key="dashCapline">
        <Setter Property="StrokeDashCap" Value="Triangle"/>
        <Setter Property="StrokeDashArray" Value="5"/>
        <Setter Property="StrokeThickness" Value="0.5"/>
        <Setter Property="Stroke" Value="Black"/>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Setter.Value>
        </Setter>

        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <!--<Setter Property="Stroke" Value="#FF1313F0"/>-->
                <Setter Property="StrokeThickness" Value="1"/>
            </Trigger>
            <EventTrigger RoutedEvent="Loaded">
                <BeginStoryboard Storyboard="{StaticResource Story_ScaleY}" />
            </EventTrigger>
        </Style.Triggers>
    </Style>

    <!--X轴虚线线样式-->
    <Style TargetType="{x:Type Line}" x:Key="XdashCapline">
        <Setter Property="StrokeDashCap" Value="Triangle"/>
        <Setter Property="StrokeDashArray" Value="5"/>
        <Setter Property="StrokeThickness" Value="0.5"/>
        <Setter Property="Stroke" Value="Black"/>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Setter.Value>
        </Setter>

        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <!--<Setter Property="Stroke" Value="#FF1313F0"/>-->
                <Setter Property="StrokeThickness" Value="1"/>
            </Trigger>
            <EventTrigger RoutedEvent="Loaded">
                <BeginStoryboard Storyboard="{StaticResource Story_DownToUp}" />
            </EventTrigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="{x:Type TextBlock}" x:Key="xTextBlock">
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform  Angle="0"/>
                    <TranslateTransform X="0"/>
                </TransformGroup>
            </Setter.Value>
        </Setter>
    </Style>

    <!--居中显示的文本-->
    <Style TargetType="{x:Type Label}" x:Key="XCenterLable">
        <Setter Property="Width" Value="100"/>
        <Setter Property="Height" Value="40"/> 
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Label}">
                    <Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
                        <TextBlock Text="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--居中显示的文本-->
    <Style TargetType="{x:Type Label}" x:Key="YRightLable">
        <Setter Property="Width" Value="100"/>
        <Setter Property="Height" Value="40"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Label}">
                    <Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
                        <TextBlock Text="{TemplateBinding Content}" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--蒙版的样式-->
    <Style TargetType="{x:Type Rectangle}" x:Key="MarkBoardRectangle">
        <Setter Property="Opacity" Value="0.1"/>
    </Style>

    <!--图表基础模板-->
    <ControlTemplate x:Key="DefaultPlotterTemplate" TargetType="{x:Type local:PlotterBase}">
        <!--<Viewbox>-->
        <Grid Background="{TemplateBinding Background}">
            <Grid.RenderTransform>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Grid.RenderTransform>

            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="10*"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="20*"/>
                <ColumnDefinition Width="1.2*"/>
            </Grid.ColumnDefinitions>

            <!--曲线区域-->
            <Canvas x:Name="PART_PathCanvas" Width="{Binding ElementName=PART_ParallelCanvas,Path=ActualWidth}" Grid.Column="1" Grid.Row="1"  ClipToBounds="True" HorizontalAlignment="Left">

                <!--<Canvas.Triggers>
                    <EventTrigger RoutedEvent="Loaded">
                        <BeginStoryboard>
                            <Storyboard   Storyboard.TargetName="PART_PathCanvas">
                                <DoubleAnimation From="0" To="0"  Duration="0:0:01" Storyboard.TargetProperty="Width"/>
                                <DoubleAnimation From="0" To="{Binding ElementName=PART_PathCanvas,Path=ActualWidth}" BeginTime="0:0:01" Duration="0:0:01" Storyboard.TargetProperty="Width"/>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger>
                </Canvas.Triggers>-->
            </Canvas>

            <!--网格区域-->
            <Canvas x:Name="PART_ParallelBottomCanvas"  Width="{Binding ElementName=PART_ParallelCanvas,Path=ActualWidth}" Grid.Column="1" Grid.Row="1"  ClipToBounds="True" HorizontalAlignment="Left"/>

            <!--网格区域-->
            <Canvas x:Name="PART_ParallelCanvas" Grid.Column="1" Grid.Row="1"  ClipToBounds="True"/>

            <!--横坐标标识-->
            <Canvas x:Name="PART_BottomCanvas" Grid.Row="2" Grid.Column="1"/>

            <!--横坐标标识-->
            <Canvas x:Name="PART_TopCanvas" Grid.Row="2" Grid.Column="1"/>

            <!--纵坐标标识-->
            <Canvas x:Name="PART_LeftCanvas"  Grid.Row="1" Grid.Column="0" />

            <!--纵坐标标识-->
            <Canvas x:Name="PART_RightCanvas" Visibility="{Binding is}"  Grid.Row="1" Grid.Column="2" />


        </Grid>
        <!--<ControlTemplate.Triggers>
            <EventTrigger RoutedEvent="Loaded">
                -->
        <!--<BeginStoryboard Storyboard="{StaticResource Story_Load}"  Storyboard.TargetName="PART_ParallelCanvas"/>-->
        <!--

                <BeginStoryboard>
                    <Storyboard   Storyboard.TargetName="PART_PathCanvas">
                        <DoubleAnimation From="0" To="{Binding ElementName=PART_PathCanvas,Path=ActualWidth}" BeginTime="0:0:01" Duration="0:0:01" Storyboard.TargetProperty="Width"/>
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
        </ControlTemplate.Triggers>-->

        <!--<ControlTemplate.Triggers>
            <EventTrigger RoutedEvent="RefreshStory">
                -->
        <!--<BeginStoryboard>
                    <Storyboard   Storyboard.TargetName="PART_PathCanvas">
                        <DoubleAnimation From="0" To="0"  Duration="0:0:01" Storyboard.TargetProperty="Width"/>
                        <DoubleAnimation From="0" To="{Binding ElementName=PART_PathCanvas,Path=ActualWidth}" BeginTime="0:0:01" Duration="0:0:01" Storyboard.TargetProperty="Width"/>
                    </Storyboard>
                </BeginStoryboard>-->
        <!--
            </EventTrigger>
        </ControlTemplate.Triggers>-->
    </ControlTemplate>

    <!--默认图表样式-->
    <Style x:Key="DefaultPlotterStyle" TargetType="{x:Type local:PlotterBase}">
        <Setter Property="Template" Value="{StaticResource DefaultPlotterTemplate}"/>
    </Style>

    <Style TargetType="{x:Type Line}" x:Key="CardiogramDashCapline">
        <!--<Setter Property="StrokeDashCap" Value="Triangle"/>
        <Setter Property="StrokeDashArray" Value="5"/>-->
        <Setter Property="StrokeThickness" Value="0.2"/>
        <Setter Property="Stroke" Value="Red"/>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Setter.Value>
        </Setter>
        <!--<Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                -->
        <!--<Setter Property="Stroke" Value="#FF1313F0"/>-->
        <!--
                <Setter Property="StrokeThickness" Value="1"/>
            </Trigger>
            -->
        <!--<EventTrigger RoutedEvent="Loaded">
                <BeginStoryboard Storyboard="{StaticResource Story_ScaleY}" />
            </EventTrigger>-->
        <!--
        </Style.Triggers>-->
    </Style>

    <!--实线线样式-->
    <Style TargetType="{x:Type Line}" x:Key="CardiogramDefaltLine">
        <Setter Property="Stroke" Value="Red"/>
        <Setter Property="StrokeThickness" Value="1"/>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Setter.Value>
        </Setter>

        <!--<Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                -->
        <!--<Setter Property="Stroke" Value="#FF1313F0"/>-->
        <!--
                <Setter Property="StrokeThickness" Value="1"/>
            </Trigger>
            -->
        <!--<EventTrigger RoutedEvent="Loaded">
                <BeginStoryboard Storyboard="{StaticResource Story_ScaleY}" />
            </EventTrigger>-->
        <!--
        </Style.Triggers>-->
    </Style>

    <Style TargetType="{x:Type Path}" x:Key="CardiogramDefaultPath">
        <Setter Property="StrokeThickness" Value="1"/>
        <Setter Property="Stroke" Value="DarkRed"/>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type local:StaticCurveChartPlotter}" x:Key="S.StaticCurveChartPlotter.Default">
        <Setter Property="Background" Value="White"/>
        <Setter Property="Foreground" Value="Black"/>
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="IsLegendVisible" Value="True"/>
        <Setter Property="Height" Value="200"/>
        <Setter Property="Width" Value="800"/>
    </Style>

    <SolidColorBrush x:Key="MaxLineColor" Color="#FFFFFF"></SolidColorBrush>

</ResourceDictionary>