<UserControl x:Class="Valg.EVA.Skanning.JobManagement.Startup.UI.Duplicates.DuplicateBallotsDetailsView"
             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:duplicates="clr-namespace:Valg.EVA.Skanning.JobManagement.Startup.UI.Duplicates"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300"
             d:DataContext="{d:DesignInstance d:Type=duplicates:DuplicateBallotsDetailsViewModel}"
             >

    <StackPanel>
        <TextBlock Text="{Binding JobManagementLanguageString.DuplicatesGroupedByBallotNumber}" Style="{StaticResource TextBlockMediumHeader}" />
        <ItemsControl ItemsSource="{Binding BallotDetailsViewModels }" Margin="0,10,0,0">
            <ItemsControl.Resources>
                <Style TargetType="Button" BasedOn="{StaticResource LinkButtonNormal}">
                    <Setter Property="Margin" Value="0,0,0,5" />
                </Style>
            </ItemsControl.Resources>
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Vertical">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding Description}" Style="{StaticResource TextBlockNormal}" />
                            <Button Margin="5,0,0,0" Command="{Binding ShowImagesCommand}" Content="{Binding JobManagementLanguageString.ViewBallots}" />
                        </StackPanel>
                        <ItemsControl ItemsSource="{Binding BoxesContainingBallot}" Margin="10, 0, 0, 0">
                            <ItemsControl.Template>
                                <ControlTemplate TargetType="ItemsControl">
                                    <StackPanel Margin="0, 0, 0, 10">
                                        <ItemsPresenter />
                                    </StackPanel>
                                </ControlTemplate>
                            </ItemsControl.Template>
                            <ItemsControl.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding Description}" Style="{StaticResource TextBlockNormal}" />
                                </DataTemplate>
                            </ItemsControl.ItemTemplate>
                        </ItemsControl>
                    </StackPanel>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </StackPanel>
</UserControl>
