<Window x:Class="Valg.EVA.Skanning.Verify.Startup.VerifyBallotPaper.BallotNumber.ContestAffiliationWindow"
        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:ballotNumber="clr-namespace:Valg.EVA.Skanning.Verify.Startup.VerifyBallotPaper.BallotNumber"
        xmlns:commands="clr-namespace:Valg.EVA.Skanning.UserInterfaceElements.Commands;assembly=Valg.EVA.Skanning.UserInterfaceElements"
        d:DataContext="{d:DesignInstance d:Type=ballotNumber:ElectionContestAffiliationInfoDialogViewModel}"
        mc:Ignorable="d"
        d:DesignHeight="507" d:DesignWidth="596"
        WindowStartupLocation="CenterOwner"
        ShowInTaskbar="False"
        WindowStyle="None"
        BorderBrush="#598026"
        BorderThickness="4"
        ResizeMode="NoResize"
        Width="596" 
        Height="507">
    <Window.InputBindings>
        <KeyBinding Key="Escape" 
                    Command="{x:Static commands:WellKnownSystemCommands.CloseCommand}" 
                    CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"
                    />
        <KeyBinding Key="Enter" 
                    Command="{x:Static commands:WellKnownSystemCommands.CloseCommand}" 
                    CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"
                    />
    </Window.InputBindings>
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Valg.EVA.Skanning.Assets;component/ResourceDictionaries/ResourceLibrary.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <DockPanel FocusManager.FocusedElement="{Binding ElementName=OkButton}" Margin="30">
        <TextBlock DockPanel.Dock="Top"  FontSize="24" FontFamily="Arial" Text="{Binding ElectionAndContestHeader, Mode=OneWay}" TextWrapping="Wrap"/>
        <ItemsControl DockPanel.Dock="Top" ItemsSource="{Binding ContestAffiliations, Mode=OneWay}" Margin="0,40,0,0">
            <ItemsControl.ItemTemplate>
                <DataTemplate DataType="ballotNumber:AffiliationSelection">
                    <BulletDecorator Width="Auto" Margin="10, 0, 0, 0">
                        <BulletDecorator.Bullet>
                            <Ellipse Fill="Black" Stroke="Black" StrokeThickness="1" Width="5" Height="5"/>
                        </BulletDecorator.Bullet>
                        <TextBlock Margin="5, 0, 0, 0">
                            <TextBlock Text="{Binding Name}" FontSize="16" />
                        </TextBlock>
                    </BulletDecorator>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
        <Button DockPanel.Dock="Bottom" HorizontalAlignment="Right" VerticalAlignment="Bottom" Style="{StaticResource BlueButton}" MinWidth="115" Height="49px" 
                Command="{x:Static commands:WellKnownSystemCommands.CloseCommand}" 
                CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"
                TabIndex="0" Name="OkButton"
                Content="{Binding LanguageString.Button_Close, FallbackValue='Close'}">
        </Button>
    </DockPanel>
</Window>
