RedactionContent.xaml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <UserControl
  2. x:Class="PDF_Master.Views.EditTools.Redaction.RedactionContent"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:cus="clr-namespace:PDF_Master.CustomControl"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:prism="http://prismlibrary.com/"
  9. xmlns:redaction="clr-namespace:PDF_Master.ViewModels.EditTools.Redaction"
  10. d:DataContext="{d:DesignInstance Type=redaction:RedactionContentViewModel}"
  11. d:DesignHeight="760"
  12. d:DesignWidth="1280"
  13. prism:ViewModelLocator.AutoWireViewModel="True"
  14. mc:Ignorable=" d">
  15. <UserControl.Resources>
  16. <ResourceDictionary>
  17. <Style BasedOn="{StaticResource RectangleRadionButtonWithCorner}" TargetType="{x:Type RadioButton}">
  18. <Setter Property="Width" Value="auto" />
  19. <Setter Property="Height" Value="28" />
  20. <Setter Property="Margin" Value="4,6" />
  21. <Setter Property="Background" Value="Transparent" />
  22. </Style>
  23. </ResourceDictionary>
  24. </UserControl.Resources>
  25. <Grid Background="{StaticResource color.sys.layout.mg}">
  26. <Grid.RowDefinitions>
  27. <RowDefinition Height="40" />
  28. <RowDefinition />
  29. </Grid.RowDefinitions>
  30. <Grid>
  31. <TextBlock
  32. Margin="16,0,0,0"
  33. VerticalAlignment="Center"
  34. FontFamily="Segoe UI"
  35. FontSize="14"
  36. FontWeight="SemiBold"
  37. Foreground="{StaticResource color.sys.text.neutral.lv1}"
  38. Text="Redact" />
  39. <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
  40. <ToggleButton
  41. Width="auto"
  42. Height="28"
  43. Padding="4,0"
  44. IsChecked="True"
  45. Style="{StaticResource SubToolbarTgb}">
  46. <StackPanel Orientation="Horizontal">
  47. <Path
  48. Width="20"
  49. Height="20"
  50. Data="M0.75 4H20.75V2H0.75V4ZM0.75 11H9.75V9H0.75V11ZM9.75 18H0.75V16H9.75V18ZM13.75 6C13.1977 6 12.75 6.44771 12.75 7V17C12.75 17.5523 13.1977 18 13.75 18H19.75C20.3023 18 20.75 17.5523 20.75 17V7C20.75 6.44772 20.3023 6 19.75 6H13.75Z"
  51. Fill="{StaticResource color.icon.base.brand}" />
  52. <TextBlock
  53. Margin="4,0,0,0"
  54. VerticalAlignment="Center"
  55. Text="Redact Text Image" />
  56. </StackPanel>
  57. </ToggleButton>
  58. <Button
  59. Width="auto"
  60. Height="28"
  61. Margin="8,0"
  62. Padding="4,0"
  63. Command="{Binding PageRedactionCommand}"
  64. Style="{StaticResource subToolBar}">
  65. <StackPanel Orientation="Horizontal">
  66. <Path
  67. Width="20"
  68. Height="20"
  69. Data="M16.75 18H4.75V2H12.6171L16.75 6.74847V18ZM2.75 2C2.75 0.895431 3.64543 0 4.75 0H12.6171C13.1956 0 13.7458 0.250541 14.1257 0.686951L18.2586 5.43542C18.5755 5.79948 18.75 6.26584 18.75 6.74847V18C18.75 19.1046 17.8546 20 16.75 20H4.75C3.64543 20 2.75 19.1046 2.75 18V2ZM11.95 4H6.75V16H14.75V7.42857L11.95 4Z"
  70. Fill="{StaticResource color.icon.base.brand}" />
  71. <TextBlock
  72. Margin="4,0,0,0"
  73. VerticalAlignment="Center"
  74. Text="Redact Page" />
  75. </StackPanel>
  76. </Button>
  77. </StackPanel>
  78. <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
  79. <Button
  80. Height="24"
  81. Margin="8,0"
  82. Padding="8,0"
  83. Command="{Binding ApplyCommmand}"
  84. CommandParameter="All"
  85. Content="应用密文"
  86. Style="{StaticResource Btn.cta}" />
  87. <Button
  88. Height="24"
  89. Margin="8,0"
  90. Padding="8,0"
  91. Command="{Binding EraseCommand}"
  92. CommandParameter="All"
  93. Content="擦除密文"
  94. Style="{StaticResource Btn.cta}" />
  95. <Button
  96. Width="auto"
  97. Height="24"
  98. Margin="8,0,16,0"
  99. Padding="8,0"
  100. Command="{Binding CloseEditToolCommand}"
  101. Content="关闭"
  102. Style="{StaticResource btn.sec}" />
  103. </StackPanel>
  104. </Grid>
  105. <Grid Grid.Row="1" Background="#E7E9EC">
  106. <Grid>
  107. <ContentControl prism:RegionManager.RegionName="{Binding RedactionDocumentRegionName}" />
  108. </Grid>
  109. <cus:PaginationControl
  110. Margin="24,24"
  111. HorizontalAlignment="Left"
  112. VerticalAlignment="Bottom"
  113. CurrentPage="{Binding CurrentPage, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  114. PageCount="{Binding PageCount}" />
  115. </Grid>
  116. </Grid>
  117. </UserControl>