HomePagePrinterDocumentContent.xaml 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter.HomePagePrinterDocumentContent"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:prism="http://prismlibrary.com/" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  5. prism:ViewModelLocator.AutoWireViewModel="True" >
  6. <Grid Height="356" Width="212">
  7. <Border Height="356" Width="212" Background="#F7F8FA" HorizontalAlignment="Center" VerticalAlignment="Top">
  8. <Grid>
  9. <Grid.RowDefinitions>
  10. <RowDefinition Height="52"></RowDefinition>
  11. <RowDefinition></RowDefinition>
  12. <RowDefinition Height="56"></RowDefinition>
  13. </Grid.RowDefinitions>
  14. <Grid Grid.Row="0" Margin="16">
  15. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Bottom" Orientation="Horizontal">
  16. <TextBlock Text="size:" FontFamily="Segoe UI" FontSize="12"></TextBlock>
  17. <TextBlock Text="{Binding PaperWidth}" FontFamily="Segoe UI" FontSize="12"></TextBlock>
  18. <TextBlock Text="*" FontFamily="Segoe UI" FontSize="12"></TextBlock>
  19. <TextBlock Text="{Binding PaperHeight}" FontFamily="Segoe UI" FontSize="12"></TextBlock>
  20. <TextBlock Text="mm" FontFamily="Segoe UI" FontSize="12"></TextBlock>
  21. </StackPanel>
  22. </Grid>
  23. <Border Grid.Row="1" Width="{Binding ViewBoxWidth}" Height="{Binding ViewBoxHeight}" BorderThickness="1" BorderBrush="#19000000" CornerRadius="2">
  24. <Grid Background="White">
  25. <Viewbox>
  26. <Image Name="Image" Source="{Binding BitmapSource}"></Image>
  27. </Viewbox>
  28. </Grid>
  29. </Border>
  30. <Grid Grid.Row="2">
  31. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
  32. <Button Name="PrePageBtn" Width="20" Height="20" HorizontalAlignment="Left" FontSize="16" Background="WhiteSmoke" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Command="{Binding TurnPageCommand}" CommandParameter="{Binding ElementName=PrePageBtn}">
  33. <TextBlock Text="&lt;" VerticalAlignment="Center"></TextBlock>
  34. </Button>
  35. <TextBox x:Name="CurrentPageIndexTxt" Width="30" Height="25" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10,0,5,0" Text="{Binding TargetPaperIndex, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" >
  36. <i:Interaction.Triggers>
  37. <i:EventTrigger x:Name="PropertyChanged">
  38. <i:InvokeCommandAction Command="{Binding JumpPageCommand}" CommandParameter="{Binding ElementName=CurrentPageIndexTxt}"></i:InvokeCommandAction>
  39. </i:EventTrigger>
  40. </i:Interaction.Triggers>
  41. </TextBox>
  42. <TextBlock Text="of" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0" FontFamily="Segoe UI" FontSize="14"></TextBlock>
  43. <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" Text="{Binding PrintedPageCount}"></TextBlock>
  44. <Button Name="NextPageBtn" Width="20" Height="20" HorizontalAlignment="Left" FontSize="16" Background="WhiteSmoke" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Command="{Binding TurnPageCommand}" CommandParameter="{Binding ElementName=NextPageBtn}">
  45. <TextBlock Text=">" VerticalAlignment="Center"></TextBlock>
  46. </Button>
  47. </StackPanel>
  48. </Grid>
  49. </Grid>
  50. </Border>
  51. </Grid>
  52. </UserControl>