<UserControl x:Class="HeBianGu.WPF.EChart.Legend"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:HeBianGu.WPF.EChart"
             mc:Ignorable="d" >
    <Canvas>
        <Grid Canvas.Top="{Binding Path=LegendTop, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:Legend}}}" 
              Canvas.Bottom="{Binding Path=LegendBottom, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:Legend}}}"
              Canvas.Left="{Binding Path=LegendLeft, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:Legend}}}"
              Canvas.Right="{Binding Path=LegendRight, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:Legend}}}"
              >
            <Rectangle RadiusX="5" RadiusY="5" Stroke="Black" StrokeThickness="1" Fill="White">
                <!--<Rectangle.Effect>
                    <DropShadowEffect Direction="300" ShadowDepth="3" Opacity="0.4"/>
                </Rectangle.Effect>-->
            </Rectangle>
            <StackPanel x:Name="stackPanel" Margin="3"/>
        </Grid>
    </Canvas>
</UserControl>
