HomePagePrinterDocumentContent.xaml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <UserControl x:Class="PDF_Master.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 x:Name="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.Triggers>
  22. <Trigger Property="IsMouseOver" Value="True">
  23. <Setter Property="Background" TargetName="border" Value="{StaticResource color.item-state.hov.bg}"></Setter>
  24. </Trigger>
  25. </ControlTemplate.Triggers>
  26. </ControlTemplate>
  27. </Setter.Value>
  28. </Setter>
  29. </Style>
  30. <Style TargetType="Button" x:Key="NextPageBtnStyle">
  31. <Setter Property="Template">
  32. <Setter.Value>
  33. <ControlTemplate TargetType="{x:Type Button}">
  34. <Grid x:Name="UserfulRegion">
  35. <Border x:Name="border" BorderBrush="{StaticResource color.field.border.norm}" BorderThickness="1" CornerRadius="4" >
  36. <Grid>
  37. <Rectangle Width="24" Height="24" Fill="Transparent"></Rectangle>
  38. <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>
  39. </Grid>
  40. </Border>
  41. </Grid>
  42. <ControlTemplate.Triggers>
  43. <Trigger Property="IsMouseOver" Value="True">
  44. <Setter Property="Background" TargetName="border" Value="{StaticResource color.item-state.hov.bg}"></Setter>
  45. </Trigger>
  46. </ControlTemplate.Triggers>
  47. </ControlTemplate>
  48. </Setter.Value>
  49. </Setter>
  50. </Style>
  51. <Style TargetType="TextBox" x:Key="PageTxtStyle">
  52. <Setter Property="Height" Value="24"></Setter>
  53. <Setter Property="Width" Value="57"></Setter>
  54. <Setter Property="Template">
  55. <Setter.Value>
  56. <ControlTemplate TargetType="TextBox">
  57. <Border BorderBrush="{StaticResource color.field.border.norm}" BorderThickness="1" Background="{StaticResource color.field.bg.def}" CornerRadius="4">
  58. <ScrollViewer x:Name="PART_ContentHost" Focusable="false"
  59. HorizontalScrollBarVisibility="Hidden"
  60. VerticalScrollBarVisibility="Hidden"
  61. VerticalAlignment="Center" MinHeight="20"/>
  62. </Border>
  63. </ControlTemplate>
  64. </Setter.Value>
  65. </Setter>
  66. </Style>
  67. </UserControl.Resources>
  68. <Grid Height="356" Width="212">
  69. <Border Height="356" Width="212" Background="{StaticResource color.sys.layout.mg}" HorizontalAlignment="Center" VerticalAlignment="Top" CornerRadius="8">
  70. <Grid>
  71. <Grid.RowDefinitions>
  72. <RowDefinition Height="52"></RowDefinition>
  73. <RowDefinition></RowDefinition>
  74. <RowDefinition Height="56"></RowDefinition>
  75. </Grid.RowDefinitions>
  76. <Grid Grid.Row="0" Margin="16">
  77. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Bottom" Orientation="Horizontal">
  78. <TextBlock Text="size:" FontFamily="Segoe UI" FontSize="12"></TextBlock>
  79. <TextBlock Text="{Binding PaperWidth}" FontFamily="Segoe UI" FontSize="12"></TextBlock>
  80. <TextBlock Text="*" FontFamily="Segoe UI" FontSize="12"></TextBlock>
  81. <TextBlock Text="{Binding PaperHeight}" FontFamily="Segoe UI" FontSize="12"></TextBlock>
  82. <TextBlock Text="mm" FontFamily="Segoe UI" FontSize="12"></TextBlock>
  83. </StackPanel>
  84. </Grid>
  85. <Border Grid.Row="1" Width="{Binding ViewBoxWidth}" Height="{Binding ViewBoxHeight}" BorderThickness="1" BorderBrush="#19000000" CornerRadius="2">
  86. <Grid Background="White">
  87. <Viewbox>
  88. <Image Name="Image" Source="{Binding BitmapSource}" RenderOptions.BitmapScalingMode="HighQuality"></Image>
  89. </Viewbox>
  90. </Grid>
  91. </Border>
  92. <Grid Grid.Row="2">
  93. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
  94. <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}">
  95. </Button>
  96. <TextBox x:Name="CurrentPageIndexTxt" Style="{StaticResource PageTxtStyle}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10,0,5,0" Text="{Binding TargetPaperIndex, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" >
  97. <i:Interaction.Triggers>
  98. <i:EventTrigger x:Name="PropertyChanged">
  99. <i:InvokeCommandAction Command="{Binding JumpPageCommand}" CommandParameter="{Binding ElementName=CurrentPageIndexTxt}"></i:InvokeCommandAction>
  100. </i:EventTrigger>
  101. </i:Interaction.Triggers>
  102. </TextBox>
  103. <TextBlock Text="of" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0" FontFamily="Segoe UI" FontSize="14"></TextBlock>
  104. <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" Text="{Binding PrintedPageCount}"></TextBlock>
  105. <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}">
  106. </Button>
  107. </StackPanel>
  108. </Grid>
  109. </Grid>
  110. </Border>
  111. </Grid>
  112. </UserControl>