MarkSettingDialog.xaml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <UserControl
  2. x:Class="PDF_Master.Views.Dialog.Redaction.MarkSettingDialog"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:com="clr-namespace:PDF_Master.CustomControl.CompositeControl"
  6. xmlns:convert="clr-namespace:PDF_Master.DataConvert"
  7. xmlns:cus="clr-namespace:PDF_Master.CustomControl"
  8. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  9. xmlns:local="clr-namespace:PDF_Master.Views.Dialog.Redaction"
  10. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  11. xmlns:prism="http://prismlibrary.com/"
  12. xmlns:redaction="clr-namespace:PDF_Master.ViewModels.Dialog.Redaction"
  13. Width="432"
  14. Height="462"
  15. d:DataContext="{d:DesignInstance Type=redaction:MarkSettingDialogViewModel}"
  16. d:DesignHeight="450"
  17. d:DesignWidth="800"
  18. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  19. prism:ViewModelLocator.AutoWireViewModel="True"
  20. Background="{StaticResource color.sys.layout.anti}"
  21. mc:Ignorable="d">
  22. <UserControl.Resources>
  23. <convert:InvertBoolConvert x:Key="InvertBoolConvert" />
  24. </UserControl.Resources>
  25. <cus:DialogContent Header="Settings">
  26. <StackPanel Margin="16,0">
  27. <Grid Height="24">
  28. <TextBlock
  29. VerticalAlignment="Center"
  30. FontSize="12"
  31. Foreground="{StaticResource color.sys.text.neutral.lv2}"
  32. Text="Marker Color" />
  33. </Grid>
  34. <StackPanel
  35. Height="32"
  36. Margin="0,8"
  37. Orientation="Horizontal">
  38. <TextBlock
  39. Name="TbOurline"
  40. VerticalAlignment="Center"
  41. Text="Redaction Mark Outline Color:" />
  42. <com:ColorContent
  43. Margin="16,0,0,0"
  44. SelectedColor="{Binding LineColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  45. ShowColorList="Collapsed" />
  46. </StackPanel>
  47. <StackPanel Height="32" Orientation="Horizontal">
  48. <TextBlock
  49. Width="{Binding ElementName=TbOurline, Path=Width}"
  50. VerticalAlignment="Center"
  51. Text="Redact Area Fill Color:" />
  52. <com:ColorContent
  53. Margin="16,0,0,0"
  54. SelectedColor="{Binding BgColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  55. ShowColorList="Collapsed" />
  56. </StackPanel>
  57. <CheckBox
  58. Name="chkText"
  59. Margin="0,16,0,8"
  60. Content="Use Overlay Text"
  61. IsChecked="{Binding IsUseText}" />
  62. <Border
  63. Width="400"
  64. Height="198"
  65. Background="{StaticResource color.sys.layout.mg}"
  66. CornerRadius="4"
  67. IsEnabled="{Binding ElementName=chkText, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}">
  68. <StackPanel Margin="8">
  69. <cus:TextBoxEx
  70. Height="70"
  71. VerticalContentAlignment="Top"
  72. Text="{Binding OvertText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
  73. <TextBlock
  74. Margin="0,10"
  75. FontSize="12"
  76. Foreground="{StaticResource color.sys.text.neutral.lv2}"
  77. Text="Font" />
  78. <StackPanel Orientation="Horizontal">
  79. <ComboBox
  80. Width="122.67"
  81. Height="32"
  82. ItemsSource="{Binding FontFamilys}"
  83. SelectedIndex="{Binding FontFamilySelectedIndex}" />
  84. <ComboBox
  85. Width="122.67"
  86. Height="32"
  87. Margin="8,0"
  88. ItemsSource="{Binding FontWeight}"
  89. SelectedIndex="{Binding FontWeightSelectedIndex}" />
  90. <ComboBox
  91. Width="122.67"
  92. Height="32"
  93. ItemsSource="{Binding FontSizes}"
  94. SelectedIndex="{Binding FontSizeSelectedIndex}" />
  95. </StackPanel>
  96. <StackPanel Margin="0,8,0,0" Orientation="Horizontal">
  97. <RadioButton
  98. Width="32"
  99. Height="32"
  100. Command="{Binding AlignCommand}"
  101. CommandParameter="Left"
  102. IsChecked="{Binding LeftChecked, Mode=TwoWay}"
  103. Style="{StaticResource RectangleRadionButtonWithCorner}" />
  104. <RadioButton
  105. Width="32"
  106. Height="32"
  107. Margin="8,0"
  108. Command="{Binding AlignCommand}"
  109. CommandParameter="Center"
  110. IsChecked="{Binding CenterChecked, Mode=TwoWay}"
  111. Style="{StaticResource RectangleRadionButtonWithCorner}" />
  112. <RadioButton
  113. Width="32"
  114. Height="32"
  115. Command="{Binding AlignCommand}"
  116. CommandParameter="Right"
  117. IsChecked="{Binding RightChecked, Mode=TwoWay}"
  118. Style="{StaticResource RectangleRadionButtonWithCorner}" />
  119. <RadioButton
  120. Width="32"
  121. Height="32"
  122. Margin="8,0"
  123. Command="{Binding AlignCommand}"
  124. CommandParameter="Strech"
  125. IsChecked="{Binding StrechChecked, Mode=TwoWay}"
  126. Style="{StaticResource RectangleRadionButtonWithCorner}" />
  127. <com:ColorContent
  128. Margin="16,0,0,0"
  129. SelectedColor="{Binding FontColor}"
  130. ShowColorList="Collapsed" />
  131. </StackPanel>
  132. </StackPanel>
  133. </Border>
  134. </StackPanel>
  135. <cus:DialogContent.BottmBar>
  136. <StackPanel
  137. Margin="16,0"
  138. HorizontalAlignment="Right"
  139. Orientation="Horizontal">
  140. <Button
  141. Width="80"
  142. Height="32"
  143. Command="{Binding OkCommand}"
  144. Content="Apply"
  145. Style="{StaticResource Btn.cta}" />
  146. <Button
  147. Width="80"
  148. Height="32"
  149. Margin="16,0,0,0"
  150. Command="{Binding CancelCommand}"
  151. Content="Cancel"
  152. Style="{StaticResource btn.sec}" />
  153. </StackPanel>
  154. </cus:DialogContent.BottmBar>
  155. </cus:DialogContent>
  156. </UserControl>