<UserControl x:Class="Valg.EVA.Skanning.Verify.Startup.VerifyBallotPaper.BallotPaperStatus.BallotPaperStatusView"
             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:ballotPaperStatus="clr-namespace:Valg.EVA.Skanning.Verify.Startup.VerifyBallotPaper.BallotPaperStatus"
             xmlns:verifyBallotPaper="clr-namespace:Valg.EVA.Skanning.Verify.Startup.VerifyBallotPaper"
             mc:Ignorable="d"
             d:DataContext="{d:DesignInstance ballotPaperStatus:BallotPaperStatusViewModel}"
             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>
    <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
        <StackPanel.Style>
            <Style TargetType="StackPanel">
                <Style.Resources>
                    <Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockNormal}">
                        <Setter Property="FontSize" Value="16" />
                        <Setter Property="Margin" Value="5" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding Status}" Value="{x:Static ballotPaperStatus:BallotStatus.Started}">
                                <Setter Property="Foreground" Value="{StaticResource BlackForeground}" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Status}" Value="{x:Static ballotPaperStatus:BallotStatus.SuggestedRejected}">
                                <Setter Property="Foreground" Value="{StaticResource ButtonNormalForegroundBrush}" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Status}" Value="{x:Static ballotPaperStatus:BallotStatus.Verified}">
                                <Setter Property="Foreground" Value="{StaticResource ButtonNormalForegroundBrush}" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                    <Style TargetType="Button" BasedOn="{StaticResource LinkButtonNormal}">
                        <Setter Property="FontSize" Value="16" />
                        <Setter Property="Margin" Value="5" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding Status}" Value="{x:Static ballotPaperStatus:BallotStatus.Started}">
                                
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Status}" Value="{x:Static ballotPaperStatus:BallotStatus.SuggestedRejected}">
                                <Setter Property="Foreground" Value="{StaticResource ButtonNormalForegroundBrush}" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Status}" Value="{x:Static ballotPaperStatus:BallotStatus.Verified}">
                                <Setter Property="Foreground" Value="{StaticResource ButtonNormalForegroundBrush}" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Style.Resources>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding Status}" Value="{x:Static ballotPaperStatus:BallotStatus.Started}">
                        <Setter Property="StackPanel.Background" Value="White" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Status}" Value="{x:Static ballotPaperStatus:BallotStatus.SuggestedRejected}">
                        <Setter Property="StackPanel.Background" Value="{StaticResource Red}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Status}" Value="{x:Static ballotPaperStatus:BallotStatus.Verified}">
                        <Setter Property="StackPanel.Background" Value="{StaticResource Green}" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </StackPanel.Style>        
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="6"><TextBlock
                VerticalAlignment="Bottom"
                HorizontalAlignment="Center"                
                Focusable="False"
                Text="{Binding VerifyLanguageString.BallotPaperXOfY_StatusText, Mode=OneWay}" />
            <Button
                HorizontalAlignment="Center"
                VerticalAlignment="Center"                
                Focusable="False"
                Command="{Binding DataContext.VerifiableViewModelsCollectionVisitor.ResumeVisitationOfVerifiableViewModelsCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type verifyBallotPaper:VerifyBallotPaperControl}}}"
                Content="{Binding Status, Mode=OneWay, Converter={StaticResource EnumeratorToTextConverter}, ConverterParameter='VerifyLanguageString'}" />
        </StackPanel>
    </StackPanel>
</UserControl>
