PrintPreviewControl.xaml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <UserControl x:Class="ComPDFKit.Controls.PDFControl.PrintPreviewControl"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:ComPDFKit.Controls.PDFControl"
  7. mc:Ignorable="d"
  8. d:DesignHeight="360" d:DesignWidth="240" Background="#F7F8FA">
  9. <Grid>
  10. <Grid.RowDefinitions>
  11. <RowDefinition Height="20"></RowDefinition>
  12. <RowDefinition></RowDefinition>
  13. <RowDefinition Height="40"></RowDefinition>
  14. </Grid.RowDefinitions>
  15. <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
  16. <TextBlock Text="{Binding PaperKind}" Margin="0,0,10,0"></TextBlock>
  17. <TextBlock Text="size"></TextBlock>
  18. <TextBlock Text="{Binding PaperWidth}"></TextBlock>
  19. <TextBlock Text="*"></TextBlock>
  20. <TextBlock Text="{Binding PaperHeight}"></TextBlock>
  21. </StackPanel>
  22. <Grid Grid.Row="1" Margin="5">
  23. <Viewbox Height="{Binding ViewBoxHeight}" Width="{Binding ViewBoxWidth}">
  24. <Image Name="imgPrint" RenderOptions.BitmapScalingMode="HighQuality" Source="{Binding PreviewBitmapSource}">
  25. </Image>
  26. </Viewbox>
  27. </Grid>
  28. <StackPanel Grid.Row="2" HorizontalAlignment="Center" Orientation="Horizontal">
  29. <Button x:Name="btnPreButton" Height="32" Width="36" Margin="0,0,12,0" Click="btnPreButton_Click"></Button>
  30. <TextBox x:Name="txbPageIndex" Height="32" Width="50" Text="{Binding PaperIndex, UpdateSourceTrigger=PropertyChanged}" LostFocus="txbPageIndex_LostFocus" PreviewLostKeyboardFocus="txbPageIndex_PreviewLostKeyboardFocus"></TextBox>
  31. <TextBlock Text=" of " VerticalAlignment="Center"></TextBlock>
  32. <TextBlock Text="{Binding PrintedPageCount}" VerticalAlignment="Center"></TextBlock>
  33. <Button x:Name="btnNextButton" Height="32" Width="36" Margin="12,0,0,0" Click="btnNextButton_Click"></Button>
  34. </StackPanel>
  35. </Grid>
  36. </UserControl>