<userInterfaceElements:EvaWindow x:Class="Valg.EVA.Skanning.JobManagement.Startup.UI.Duplicates.ResolveDuplicatesPopupView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Valg.EVA.Skanning.JobManagement.Startup.UI.Duplicates"
        xmlns:userInterfaceElements="clr-namespace:Valg.EVA.Skanning.UserInterfaceElements;assembly=Valg.EVA.Skanning.UserInterfaceElements"
        mc:Ignorable="d"
        Style="{DynamicResource PopUpWindowAction}"
        Title="ResolveDuplicatesPopupView" 
        WindowStartupLocation="CenterOwner"
        MinHeight="700" MaxHeight="700" MinWidth="500" MaxWidth="500"
        d:DataContext="{d:DesignInstance local:ResolveDuplicatesPopupViewModel}">
    <Grid Margin="30">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto" MinHeight="70"/>
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0" Text="{Binding PossibleDuplicatesInCountingHeader}" Style="{StaticResource TextBlockMediumHeader}" TextWrapping="Wrap" />
        <TextBlock Grid.Row="1" Text="{Binding PossibleDuplicatesInfoText}" Style="{StaticResource TextBlockNormal}"  TextWrapping="Wrap" Margin="0,20,0,0"/>
        <Button Grid.Row="2" Style="{StaticResource LinkButtonMedium}" Command="{Binding OpenViewBallotsDialogCommand}" Content="{Binding ViewDuplicateBallots}" Margin="0,20,0,20" />
        <Grid Grid.Row="3">
            <Grid.Resources>
                <Style TargetType="{x:Type RadioButton}">
                    <Setter Property="FontFamily" Value="Arial"/>
                    <Setter Property="FontSize" Value="14"/>
                </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <RadioButton Grid.Row="0" Margin="0,0,0,0" IsChecked="{Binding IsNoDuplicatesOptionChecked}" Content="{Binding ThereAreNoDuplicates}"/>
            <RadioButton Grid.Row="1" Margin="0,20,0,20" IsChecked="{Binding IsDeleteAllBoxesOptionChecked}" Content="{Binding DeleteAllBoxes}" />
            <RadioButton Grid.Row="2" Margin="0,0,0,20" IsChecked="{Binding IsDeleteSomeBoxesOptionChecked}" Content="{Binding DeleteIndividualBoxes}"/>
            <ListBox Grid.Row="3" IsEnabled="{Binding IsDeleteSomeBoxesOptionChecked}" Margin="20,0,0,0" ItemsSource="{Binding AllBoxes}" BorderThickness="0" >
                <ListBox.ItemTemplate>
                    <DataTemplate DataType="{x:Type local:ResolveDuplicatesBox}">
                        <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsSelectedForDeletion}" />
                            <TextBlock Text="{Binding BoxName}"/>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
        <StackPanel Grid.Row="4" Orientation="Horizontal">
            <Button Style="{StaticResource BlueButtonOk}" Height="49" Margin="0,0,10,0" IsEnabled="{Binding AreValidOptionsSelected}" Content="{Binding CompleteHandlingOfDuplicates}" IsDefault="True" Click="ButtonBase_OnClick" />
            <Button Style="{StaticResource RedButtonCancel}" Height="49" Content="{Binding Cancel}" IsCancel="True" Click="ButtonBase_OnClick" Command="{Binding CancelCommand}" />
        </StackPanel>
    </Grid>
</userInterfaceElements:EvaWindow>


