<Window x:Class="Aucma.Core.PrintTo.Views.SpecialPrintToView"
        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:Aucma.Core.PrintTo.Views"
        mc:Ignorable="d"
        Background="#1152AC" 
        Name="window" 
           FontFamily="Microsoft YaHei"
        Title="SpecialPrintToView" Height="450" Width="800"   WindowStyle="ToolWindow">
    <Border Margin="5" BorderBrush="#0288d1" BorderThickness="1"  CornerRadius="5" >
        <UniformGrid   Margin="16 10" >
            <GroupBox Margin="16 0" Header="打印详情" >
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <WrapPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <TextBlock Text="打印进度" FontSize="20" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        <ProgressBar Style="{x:Null}" Height="20" Minimum="1" Maximum="{Binding MaxProgress}" Value="{Binding Progress}" Width="300"  Margin="6"/>
                    </WrapPanel>
                    <WrapPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <TextBlock Text="打印信息" FontSize="20" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        <TextBox Text="{Binding PrintProgress,Mode=TwoWay}" FontSize="20" Width="300" Foreground="White" BorderBrush="White" 
                                  Margin="10 0 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" IsReadOnly="True"/>
                    </WrapPanel>
                    <WrapPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <TextBlock Text="打印状态" FontSize="20" Foreground="White" Margin="5"/>
                        <TextBlock  FontSize="20" Margin="10 0" Background="{Binding State,Mode=TwoWay}" Width="20" Height="20" 
                                     HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        <TextBlock Text="异常条码数量:" Margin="5" FontSize="20" Foreground="White"/>
                        <TextBlock Text="{Binding ErrorNum,Mode=TwoWay}" FontSize="20" Margin="10 0" Width="130" Foreground="White"  IsEnabled="True"
                                    HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </WrapPanel>
                    <WrapPanel Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <Button Content="打印" x:Name="Start" FontSize="20" Height="40" Margin="20 0" Command="{Binding StartOperateCommand}"  IsEnabled="{Binding OperateEnabled,Mode=TwoWay}"/>
                        <Button Content="暂停" x:Name="Suspend" FontSize="20" Height="40" Margin="20 0" Command="{Binding SuspendOperateCommand}"  IsEnabled="{Binding SuspendEnabled,Mode=TwoWay}" />
                        <Button Content="关闭" x:Name="Close" FontSize="20" Height="40" Margin="20 0" Command="{Binding CloseWindowCommand}"  CommandParameter="{Binding ElementName=window}" />
                    </WrapPanel>
                </Grid>
            </GroupBox>
        </UniformGrid>
    </Border>

</Window>