<UserControl x:Class="Valg.EVA.Skanning.Verify.Startup.VerifyBallotPaper.VerifyBallotPaperControl"
             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:pageXofY="clr-namespace:Valg.EVA.Skanning.Verify.Startup.VerifyBallotPaper.PageXOfY"
             xmlns:verifyBallotPaper1="clr-namespace:Valg.EVA.Skanning.Verify.Startup.VerifyBallotPaper"
             xmlns:stamp="clr-namespace:Valg.EVA.Skanning.Verify.Startup.VerifyBallotPaper.Stamp"
             xmlns:candidate="clr-namespace:Valg.EVA.Skanning.Verify.Startup.VerifyBallotPaper.Candidate"
             xmlns:ballotNumber="clr-namespace:Valg.EVA.Skanning.Verify.Startup.VerifyBallotPaper.BallotNumber"
             xmlns:writeIns="clr-namespace:Valg.EVA.Skanning.Verify.Startup.VerifyBallotPaper.WriteIns"             
             xmlns:ballotPaperStatus="clr-namespace:Valg.EVA.Skanning.Verify.Startup.VerifyBallotPaper.BallotPaperStatus"
             xmlns:renumberStrikeout="clr-namespace:Valg.EVA.Skanning.Verify.Startup.VerifyBallotPaper.RenumberStrikeout"
             xmlns:header="clr-namespace:Valg.EVA.Skanning.Verify.Startup.VerifyBallotPaper.Header"
             x:Name="verifyControl"
             mc:Ignorable="d"
             d:DataContext="{d:DesignInstance d:Type=verifyBallotPaper1:VerifyBallotPaperViewModel}"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Valg.EVA.Skanning.Assets;component/ResourceDictionaries/ResourceLibrary.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid>
        <Grid.Resources>
            <Style TargetType="TextBlock">
                <Setter Property="FontSize" Value="20" />
            </Style>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Grid Grid.Row="0" Margin="0,0,20,0" HorizontalAlignment="Stretch">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>

            <pageXofY:PageXOfYControl Grid.Column="0" HorizontalAlignment="Stretch" DataContext="{Binding PageXOfYViewModel}" />
            <ballotPaperStatus:BallotPaperStatusView Grid.Column="1" Focusable="False" DataContext="{Binding BallotPaperStatusViewModel}" />
        </Grid>

        <TabControl Grid.Row="1" BorderThickness="0" IsTabStop="False" ItemsSource="{Binding PagesViewModels}" Background="White" SelectedIndex="{Binding PageXOfYViewModel.CurrentPageIndex, Mode=OneWay}" Padding="0">
            <TabControl.Resources>
                <DataTemplate DataType="{x:Type stamp:StampVerificationPageViewModel}">
                    <stamp:StampVerificationControl VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0, 60, 0,0" />
                </DataTemplate>

                <DataTemplate DataType="{x:Type candidate:CandidatePageViewModel}">
                    <candidate:CandidatePageControl Margin="0,0,20,0" />
                </DataTemplate>

                <DataTemplate DataType="{x:Type renumberStrikeout:RenumberStrikeoutPageViewModel}">
                    <renumberStrikeout:RenumberStrikeoutPageControl Margin="0,0,20,0" />
                </DataTemplate>

                <DataTemplate DataType="{x:Type ballotNumber:BallotNumberViewModel}">
                    <ballotNumber:BallotNumberView VerticalAlignment="Top" HorizontalAlignment="Center"  Margin="0, 60, 0,0" />
                </DataTemplate>

                <DataTemplate DataType="{x:Type header:AffiliationHeaderViewModel}">
                    <header:AffiliationHeaderView VerticalAlignment="Top" HorizontalAlignment="Center"  Margin="0, 60, 0,0" />
                </DataTemplate>

                <DataTemplate DataType="{x:Type writeIns:WriteInPageViewModel}">
                    <writeIns:WriteInPageView Margin="0, 60, 0,0" />
                </DataTemplate>
            </TabControl.Resources>
            <TabControl.ItemContainerStyle>
                <Style TargetType="TabItem">
                    <Setter Property="Visibility" Value="Collapsed" />
                    <Setter Property="VerticalAlignment" Value="Top" />
                </Style>
            </TabControl.ItemContainerStyle>
        </TabControl>
    </Grid>
</UserControl>
