<UserControl x:Class="ChartSamples.StyledChart"
    xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    >
    <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="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>
      <SolidColorBrush x:Key="CE_SampleForeground" Color="#FFF0F8FE"/>
      <Style x:Key="CE_SampleChart" TargetType="c1:C1Chart">
        <Setter Property="Foreground" Value="#FFF0F8FE" />
        <Setter Property="Background" Value="#ff071D2E" />
        <Setter Property="BorderBrush" Value="#FF8FB4CC" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="10" />
      </Style>
    </UserControl.Resources>
  <Border Margin="2" BorderBrush="#FF8FB4CC" BorderThickness="1">
    <Grid x:Name="LayoutRoot">
      <c1:C1Chart Margin="4" x:Name="c1chart" Loaded="c1chart_Loaded" >
        <c1:C1ChartLegend />
       </c1:C1Chart>
    </Grid>
    </Border>
</UserControl>
