<UserControl x:Class="ControlExplorer.Controls.Chart.StyledChart"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:c1="using:C1.Xaml.Chart"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <UserControl.Resources>
        <LinearGradientBrush x:Key="mask" StartPoint="0,0" EndPoint="1,0" SpreadMethod="Reflect">
            <LinearGradientBrush.RelativeTransform>
                <TransformGroup>
                    <TranslateTransform />
                    <RotateTransform />
                </TransformGroup>
            </LinearGradientBrush.RelativeTransform>
            <GradientStop Color="#ff000000" Offset="0" />
            <GradientStop Color="#ff000000" Offset="0.25" />
            <GradientStop Color="#ff000000" Offset="0.5" />
            <GradientStop Color="#ff000000" Offset="0.75" />
            <GradientStop Color="#ff000000" Offset="1" />
        </LinearGradientBrush>
        <Storyboard x:Key="sb" >
            <DoubleAnimation Storyboard.TargetProperty="Children[0].ScaleX"
                                    To="1" Duration="0:0:0.3" />
            <DoubleAnimation Storyboard.TargetProperty="Children[0].ScaleY"
                                    To="1" BeginTime="0:0:0.3" Duration="0:0:0.3" />
        </Storyboard>
        <Storyboard x:Key="sbEnter">
            <DoubleAnimation 
        Storyboard.TargetProperty="(Shape.OpacityMask).(Brush.RelativeTransform).(TransformGroup.Children)[0].(TranslateTransform.X)"
        From="0" To="1" Duration="0:0:2" RepeatBehavior="Forever"/>
            <DoubleAnimation 
        Storyboard.TargetProperty="(Shape.OpacityMask).(Brush.RelativeTransform).(TransformGroup.Children)[1].(RotateTransform.Angle)"
                                                 From="0" To="0"
                                                 Duration="0:0:6"
                                                 RepeatBehavior="Forever"/>
            <ColorAnimation Storyboard.TargetProperty="(Shape.OpacityMask).(GradientBrush.GradientStops)[0].(GradientStop.Color)"
                                                To="#b0000000" Duration="0:0:1" />
            <ColorAnimation Storyboard.TargetProperty="(Shape.OpacityMask).(GradientBrush.GradientStops)[2].(GradientStop.Color)"
                                                To="#b0000000" Duration="0:0:1" />
            <ColorAnimation Storyboard.TargetProperty="(Shape.OpacityMask).(GradientBrush.GradientStops)[4].(GradientStop.Color)"
                                                To="#b0000000" Duration="0:0:1" />
            <DoubleAnimation Storyboard.TargetProperty="StrokeThickness"
                                                 To="4"
                                                 Duration="0:0:1"   />
        </Storyboard>
        <Storyboard x:Key="sbLeave">
            <DoubleAnimation Storyboard.TargetProperty="StrokeThickness"
                                                 Duration="0:0:1"   />
        </Storyboard>

    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <c1:C1Chart x:Name="c1chart" Loaded="c1chart_Loaded" Palette="Metro"  Margin="20, 10">
            <c1:C1ChartLegend Position="Top" Orientation="Horizontal" HorizontalAlignment="Right"/>
        </c1:C1Chart>
    </Grid>

</UserControl>
