HomePagePrinterDocumentContent.xaml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. <UserControl.Resources>
  7. <Style TargetType="Button" x:Key="PrePageBtnStyle">
  8. <Setter Property="Height" Value="24"></Setter>
  9. <Setter Property="Width" Value="24"></Setter>
  10. <Setter Property="Template">
  11. <Setter.Value>
  12. <ControlTemplate TargetType="{x:Type Button}">
  13. <Grid x:Name="UserfulRegion">
  14. <Border BorderBrush="{StaticResource color.field.border.norm}" BorderThickness="1" CornerRadius="4" >
  15. <Grid>
  16. <Rectangle Width="24" Height="24" Fill="Transparent"></Rectangle>
  17. <Path x:Name="Path" Fill="{StaticResource color.icon.base.neutral.norm.lv1}" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M3.11071 4.24945L5.43035 1.9298L4.36969 0.869141L0.769719 4.46912C0.476825 4.76201 0.476826 5.23688 0.769719 5.52978L4.36969 9.12975L5.43035 8.06909L3.11071 5.74945H14.5V4.24945H3.11071Z"></Path>
  18. </Grid>
  19. </Border>
  20. </Grid>
  21. </ControlTemplate>
  22. </Setter.Value>
  23. </Setter>
  24. </Style>
  25. <Style TargetType="Button" x:Key="NextPageBtnStyle">
  26. <Setter Property="Template">
  27. <Setter.Value>
  28. <ControlTemplate TargetType="{x:Type Button}">
  29. <Grid x:Name="UserfulRegion">
  30. <Border BorderBrush="{StaticResource color.field.border.norm}" BorderThickness="1" CornerRadius="4" >
  31. <Grid>
  32. <Rectangle Width="24" Height="24" Fill="Transparent"></Rectangle>
  33. <Path x:Name="Path" Fill="{StaticResource color.icon.base.neutral.norm.lv1}" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M11.8893 4.24992L0.5 4.24992V5.74992L11.8893 5.74992L9.56967 8.06958L10.6303 9.13024L14.2303 5.53026C14.5232 5.23737 14.5232 4.7625 14.2303 4.4696L10.6303 0.869629L9.56967 1.93029L11.8893 4.24992Z"></Path>
  34. </Grid>
  35. </Border>
  36. </Grid>
  37. </ControlTemplate>
  38. </Setter.Value>
  39. </Setter>
  40. </Style>
  41. <Style TargetType="TextBox" x:Key="PageTxtStyle">
  42. <Setter Property="Height" Value="24"></Setter>
  43. <Setter Property="Width" Value="57"></Setter>
  44. <Setter Property="Template">
  45. <Setter.Value>
  46. <ControlTemplate TargetType="TextBox">
  47. <Border BorderBrush="{StaticResource color.field.border.norm}" BorderThickness="1" Background="{StaticResource color.field.bg.def}" CornerRadius="4">
  48. <ScrollViewer x:Name="PART_ContentHost" Focusable="false"
  49. HorizontalScrollBarVisibility="Hidden"
  50. VerticalScrollBarVisibility="Hidden"
  51. VerticalAlignment="Center" MinHeight="20"/>
  52. </Border>
  53. </ControlTemplate>
  54. </Setter.Value>
  55. </Setter>
  56. </Style>
  57. </UserControl.Resources>
  58. <Grid Height="356" Width="212">
  59. <Border Height="356" Width="212" Background="{StaticResource color.sys.layout.mg}" HorizontalAlignment="Center" VerticalAlignment="Top" CornerRadius="8">
  60. <Grid>
  61. <Grid.RowDefinitions>
  62. <RowDefinition Height="52"></RowDefinition>
  63. <RowDefinition></RowDefinition>
  64. <RowDefinition Height="56"></RowDefinition>
  65. </Grid.RowDefinitions>
  66. <Grid Grid.Row="0" Margin="16">
  67. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Bottom" Orientation="Horizontal">
  68. <TextBlock Text="size:" FontFamily="Segoe UI" FontSize="12"></TextBlock>
  69. <TextBlock Text="{Binding PaperWidth}" FontFamily="Segoe UI" FontSize="12"></TextBlock>
  70. <TextBlock Text="*" FontFamily="Segoe UI" FontSize="12"></TextBlock>
  71. <TextBlock Text="{Binding PaperHeight}" FontFamily="Segoe UI" FontSize="12"></TextBlock>
  72. <TextBlock Text="mm" FontFamily="Segoe UI" FontSize="12"></TextBlock>
  73. </StackPanel>
  74. </Grid>
  75. <Border Grid.Row="1" Width="{Binding ViewBoxWidth}" Height="{Binding ViewBoxHeight}" BorderThickness="1" BorderBrush="#19000000" CornerRadius="2">
  76. <Grid Background="White">
  77. <Viewbox>
  78. <Image Name="Image" Source="{Binding BitmapSource}" RenderOptions.BitmapScalingMode="HighQuality"></Image>
  79. </Viewbox>
  80. </Grid>
  81. </Border>
  82. <Grid Grid.Row="2">
  83. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
  84. <Button Name="PrePageBtn" Tag="PrePage" Style="{StaticResource PrePageBtnStyle}" Height="24" Width="24" HorizontalAlignment="Left" FontSize="16" Background="WhiteSmoke" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Command="{Binding TurnPageCommand}" CommandParameter="{Binding ElementName=PrePageBtn}">
  85. </Button>
  86. <TextBox x:Name="CurrentPageIndexTxt" Style="{StaticResource PageTxtStyle}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10,0,5,0" Text="{Binding TargetPaperIndex, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" >
  87. <i:Interaction.Triggers>
  88. <i:EventTrigger x:Name="PropertyChanged">
  89. <i:InvokeCommandAction Command="{Binding JumpPageCommand}" CommandParameter="{Binding ElementName=CurrentPageIndexTxt}"></i:InvokeCommandAction>
  90. </i:EventTrigger>
  91. </i:Interaction.Triggers>
  92. </TextBox>
  93. <TextBlock Text="of" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0" FontFamily="Segoe UI" FontSize="14"></TextBlock>
  94. <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" Text="{Binding PrintedPageCount}"></TextBlock>
  95. <Button Name="NextPageBtn" Tag="NextPage" Style="{StaticResource NextPageBtnStyle}" Height="24" Width="24" HorizontalAlignment="Left" FontSize="16" Background="WhiteSmoke" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Command="{Binding TurnPageCommand}" CommandParameter="{Binding ElementName=NextPageBtn}">
  96. </Button>
  97. </StackPanel>
  98. </Grid>
  99. </Grid>
  100. </Border>
  101. </Grid>
  102. </UserControl>