<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">

    <ControlTemplate x:Key="DefaultLegendItemTemplate" TargetType="{x:Type local:LineLegendItem}">
        <Viewbox Height="20" >
            <Grid x:Name="g_all">
                <Canvas x:Name="c_all" Height="30" Width="150" Background="{TemplateBinding Background}">

                    <Line X1="10" X2="40" Y1="15" Y2="15" StrokeThickness="3" Stroke="{TemplateBinding Color}"/>
                    
                    <ContentControl Content="{TemplateBinding Marker}"  Canvas.Left="25" Canvas.Top="15" />

                    <TextBlock Text="{TemplateBinding Text}" Canvas.Left="50" Canvas.Top="7"/>
                </Canvas>
            </Grid>
        </Viewbox>

        <ControlTemplate.Triggers>
            <Trigger Property="IsChecked" Value="true">
                <Setter Property="Opacity" Value="0.5" TargetName="g_all"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="DefaultLineLegendItem" TargetType="{x:Type local:LineLegendItem}">
        <Setter Property="Template" Value="{StaticResource DefaultLegendItemTemplate}"/>
    </Style>
    
</ResourceDictionary>