<Window
        xmlns:pi="https://github.com/ping9719/wpfex"
        x:Class="智慧物流软件系统.MatBaseInoGenarateMatInfoView"
        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:hc="https://handyorg.github.io/handycontrol" 
        mc:Ignorable="d"
      Height="320" Width="320" WindowStyle="None" BorderThickness="0" Background="{x:Null}" AllowsTransparency="True" WindowStartupLocation="CenterScreen" Opacity="1">
    <Border BorderBrush="Gray" Background="WhiteSmoke" CornerRadius="5" BorderThickness="1">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="auto"></RowDefinition>
            </Grid.RowDefinitions>
            <TextBlock FontSize="22" Name="Title" Text="{Binding Title, FallbackValue= 生成物料明细}" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Center"/>
            <Button Margin="-5,-1" 
                    Visibility="{Binding IsClose,Converter={StaticResource Boolean2VisibilityConverter}}" 
                    Style="{StaticResource ButtonIcon}" 
                    hc:IconElement.Geometry="{StaticResource CloseGeometry}" HorizontalAlignment="Right" 
                    VerticalAlignment="Top" Click="closeClick"/>

            <StackPanel Margin="5,0" Grid.Row="1" >
                <StackPanel Orientation="Horizontal" Margin="5">
                    <TextBlock  Text="物料编码："  FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
                    <TextBlock  Name="txtMatCode"  FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="5">
                    <TextBlock  Text="物料名称："  FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
                    <TextBlock  Name="txtMatName"  FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="5">
                    <TextBlock  Text="物料规格："  FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
                    <TextBlock  Name="txtMatSpec"  FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
                </StackPanel>

                <StackPanel Orientation="Horizontal" Margin="5">
                    <TextBlock  Text="物料客户："  FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
                    <TextBlock  Name="txtMatCustomer"  FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
                </StackPanel>

                <StackPanel Orientation="Horizontal" Margin="5">
                    <TextBlock  Text="物料批次：" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
                    <TextBox Name="txtMatBatch"  MinWidth="200" MaxWidth="200" FontSize="15" 
                         VerticalAlignment="Center" HorizontalAlignment="Stretch"
                         PreviewTextInput="txtMatBatch_PreviewTextInput"
                         Style="{StaticResource TextBoxExtend}">
                    </TextBox>
                </StackPanel>

                <StackPanel Orientation="Horizontal" Margin="5">
                    <TextBlock  Text="单盘数量：" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
                    <TextBox Name="txtMatQty"  MinWidth="200" MaxWidth="200"  FontSize="15" 
                         VerticalAlignment="Center" HorizontalAlignment="Stretch"
                             PreviewTextInput="txtMatBatch_PreviewTextInput"
                         Style="{StaticResource TextBoxExtend}">
                    </TextBox>
                </StackPanel>

                <StackPanel Orientation="Horizontal" Margin="5">
                    <TextBlock  Text="物料盘数：" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
                    <TextBox Name="txtTotalCount"  MinWidth="200" MaxWidth="200"  FontSize="15" 
                         VerticalAlignment="Center" HorizontalAlignment="Stretch"
                         InputScope="Number"
                         PreviewTextInput="txtMatBatch_PreviewTextInput"
                         Style="{StaticResource TextBoxExtend}">
                    </TextBox>
                </StackPanel>
            </StackPanel>

            <StackPanel Margin="5" x:Name="spacingPanel" Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                <Button Margin="5" MinHeight="30"  FontSize="15" Content="生成" Name="btnOk" Click="btnOk_Click"/>
                <Button Margin="5" MinHeight="30"  FontSize="15" Content="生成并打印"  Click="btnOk_Click"/>
                <Button Margin="5" MinHeight="30"  FontSize="15" Content="取  消" Click="closeClick"/>
            </StackPanel>
        </Grid>
    </Border>
</Window>
