<Window x:Class="Platform.Print.PrintPreviewWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dhcc="http://www.dhcc.com.cn"
        x:Name="win"
        Title="打印窗口"
        Width="800"
        Height="600"
        WindowStartupLocation="CenterOwner">
    <Window.Resources>
        <RoutedUICommand x:Key="PrintCommand" Text="打印(Enter)" />
        <RoutedUICommand x:Key="CancelCommand" Text="取消(Cancel)" />
    </Window.Resources>
    <Window.InputBindings>
        <KeyBinding Key="Esc" Command="{StaticResource CancelCommand}" />
        <KeyBinding Key="Enter" Command="{StaticResource PrintCommand}" />
    </Window.InputBindings>
    <Window.CommandBindings>
        <CommandBinding CanExecute="CommandBinding_CanExecute"
                        Command="{StaticResource PrintCommand}"
                        Executed="PrintCommandBinding_Executed" />
        <CommandBinding CanExecute="CommandBinding_CanExecute"
                        Command="{StaticResource CancelCommand}"
                        Executed="CancelCommandBinding_Executed" />
    </Window.CommandBindings>
    <dhcc:PageContainer>
        <dhcc:TradePage x:Name="rootTradePage" dhcc:FocusManager.EnableFocusControl="{Binding ElementName=win, Path=IsEnableFocusControl}">
            <Border BorderBrush="Black" BorderThickness="2">
                <Grid Margin="10">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="50" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="100" />
                        <ColumnDefinition Width="100" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Name="Text_Title"
                               Grid.Row="0"
                               Grid.ColumnSpan="3"
                               Height="30"
                               FontSize="20"
                               FontWeight="Bold"
                               LineHeight="20"
                               Text="表单名称" />
                    <ScrollViewer Grid.Row="1"
                                  Grid.ColumnSpan="3"
                                  Margin="5"
                                  HorizontalScrollBarVisibility="Auto"
                                  VerticalScrollBarVisibility="Auto">
                        <Grid>
                            <Border Name="Panel_Print"
                                    BorderBrush="Black"
                                    BorderThickness="1" />
                            <Border Name="Panel_Print1" Panel.ZIndex="10" />
                            <Border Name="Panel_NotingPreview"
                                    Panel.ZIndex="9999"
                                    Visibility="Hidden">
                                <Border HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        BorderBrush="Red"
                                        BorderThickness="2"
                                        Padding="5">
                                    <TextBlock FontFamily="SimSun"
                                               FontSize="25"
                                               FontWeight="Bold"
                                               Foreground="Red"
                                               Text="无预览:机密数据" />
                                    <Border.RenderTransform>
                                        <RotateTransform Angle="-10" CenterX="0.5" CenterY="0.5" />
                                    </Border.RenderTransform>
                                </Border>
                            </Border>
                        </Grid>
                    </ScrollViewer>
                    <Button Grid.Row="2"
                            Grid.Column="1"
                            Height="23"
                            VerticalAlignment="Bottom"
                            Command="{StaticResource PrintCommand}"
                            Content="打印(Enter)" />
                    <Button Grid.Row="2"
                            Grid.Column="2"
                            Height="23"
                            VerticalAlignment="Bottom"
                            Command="{StaticResource CancelCommand}"
                            Content="取消(Esc)" />
                    <TextBlock Name="Text_Description"
                               Grid.Row="2"
                               Width="553"
                               Margin="5,5,0,5"
                               HorizontalAlignment="Left"
                               FontSize="16"
                               FontWeight="Bold"
                               Text="详细信息" />
                </Grid>
            </Border>
        </dhcc:TradePage>
    </dhcc:PageContainer>
</Window>
