PageMarkDialog.xaml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <UserControl
  2. x:Class="PDF_Master.Views.Dialog.Redaction.PageMarkDialog"
  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:local="clr-namespace:PDF_Master.Views.Dialog.Redaction"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:prism="http://prismlibrary.com/"
  10. xmlns:redaction="clr-namespace:PDF_Master.ViewModels.Dialog.Redaction"
  11. Width="432"
  12. Height="296"
  13. d:DataContext="{d:DesignInstance Type=redaction:PageMarkDialogViewModel}"
  14. d:DesignHeight="450"
  15. d:DesignWidth="800"
  16. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  17. prism:ViewModelLocator.AutoWireViewModel="True"
  18. Background="{StaticResource color.sys.layout.anti}"
  19. mc:Ignorable="d">
  20. <cus:DialogContent Header="Mark Page Range">
  21. <StackPanel Margin="16,0">
  22. <RadioButton
  23. Height="22"
  24. VerticalContentAlignment="Center"
  25. Command="{Binding CheckedCommand}"
  26. CommandParameter="Current"
  27. Content="Mark current page"
  28. IsChecked="True" />
  29. <RadioButton
  30. Height="22"
  31. Margin="0,8"
  32. VerticalContentAlignment="Center"
  33. Command="{Binding CheckedCommand}"
  34. CommandParameter="All"
  35. Content="Mark all page" />
  36. <RadioButton
  37. Height="22"
  38. VerticalContentAlignment="Center"
  39. Command="{Binding CheckedCommand}"
  40. CommandParameter="Odd"
  41. Content="Mark odd page" />
  42. <RadioButton
  43. Height="22"
  44. Margin="0,8"
  45. VerticalContentAlignment="Center"
  46. Command="{Binding CheckedCommand}"
  47. CommandParameter="Even"
  48. Content="Mark even page" />
  49. <RadioButton
  50. Name="RbtnCustomPage"
  51. Height="22"
  52. VerticalContentAlignment="Center"
  53. Command="{Binding CheckedCommand}"
  54. CommandParameter="Custom"
  55. Content="Mark specific page range" />
  56. <StackPanel
  57. Margin="0,6,0,0"
  58. HorizontalAlignment="Left"
  59. VerticalAlignment="Center"
  60. Orientation="Horizontal">
  61. <cus:TextBoxEx
  62. Width="228"
  63. Height="32"
  64. CornerRadius="4"
  65. IsEnabled="{Binding ElementName=RbtnCustomPage, Path=IsChecked}"
  66. PlaceholderText="e.g. 1,3-5,10"
  67. PreviewKeyDown="TextBoxEx_PreviewKeyDown"
  68. Text="{Binding CustomPage, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" />
  69. <TextBlock
  70. Name="TBPageCount"
  71. Margin="8,0,0,0"
  72. VerticalAlignment="Center"
  73. FocusVisualStyle="{x:Null}"
  74. Focusable="True"
  75. Text="{Binding PageCount}" />
  76. </StackPanel>
  77. </StackPanel>
  78. <cus:DialogContent.BottmBar>
  79. <StackPanel VerticalAlignment="Center">
  80. <StackPanel
  81. Margin="16,0"
  82. HorizontalAlignment="Right"
  83. Orientation="Horizontal">
  84. <Button
  85. Width="80"
  86. Height="32"
  87. Command="{Binding OkCommand}"
  88. Content="Apply"
  89. Style="{StaticResource Btn.cta}" />
  90. <Button
  91. Width="80"
  92. Height="32"
  93. Margin="16,0,0,0"
  94. Command="{Binding CancelCommand}"
  95. Content="Cancel"
  96. Style="{StaticResource btn.sec}" />
  97. </StackPanel>
  98. </StackPanel>
  99. </cus:DialogContent.BottmBar>
  100. </cus:DialogContent>
  101. </UserControl>