<UserControl x:Class="Hearthstone_Deck_Tracker.Windows.MainWindowControls.LocalizedChartLegend"
             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:Hearthstone_Deck_Tracker.Windows.MainWindowControls"
             xmlns:wpf="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
             xmlns:converters="clr-namespace:Hearthstone_Deck_Tracker.Utility.Converters"
             mc:Ignorable="d" d:DataContext="{d:DesignInstance local:LocalizedChartLegend}"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <converters:LocalizationConverter x:Key="LocalizationConverter" />
    </UserControl.Resources>
    <ItemsControl ItemsSource="{Binding Series}" Grid.IsSharedSizeScope="True">
        <ItemsControl.ItemTemplate>
            <DataTemplate DataType="{x:Type wpf:SeriesViewModel}">
                <Grid Margin="2" FlowDirection="LeftToRight">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto" SharedSizeGroup="Title"/>
                    </Grid.ColumnDefinitions>
                    <Rectangle Grid.Column="0" Stroke="{Binding Stroke}" Fill="{Binding Fill}" Width="15" Height="15"/>
                    <TextBlock Grid.Column="1" Margin="4,0" Text="{Binding Title, Converter={StaticResource LocalizationConverter}}" VerticalAlignment="Center" />
                </Grid>
            </DataTemplate>
        </ItemsControl.ItemTemplate>
    </ItemsControl>
</UserControl>
