AnnotBasePropertyVM.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. using ComPDFKitViewer.AnnotEvent;
  2. using Prism.Mvvm;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows.Media;
  9. namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
  10. {
  11. public class AnnotBasePropertyVM : BindableBase
  12. {
  13. //注释类型
  14. private AnnotArgsType _annotType;
  15. public AnnotArgsType AnnotType
  16. {
  17. get { return _annotType; }
  18. set => SetProperty(ref _annotType, value);
  19. }
  20. //注释类型名称
  21. private string _annotTypeTitle;
  22. public string AnnotTypeTitle
  23. {
  24. get { return _annotTypeTitle; }
  25. set => SetProperty(ref _annotTypeTitle, value);
  26. }
  27. //线条粗细大小
  28. private double _annotThickness = 1;
  29. public double AnnotThickness
  30. {
  31. get { return _annotThickness; }
  32. set => SetProperty(ref _annotThickness, value);
  33. }
  34. //线条样式
  35. private DashStyle dash = new DashStyle();
  36. public DashStyle Dash
  37. {
  38. get { return dash; }
  39. set => SetProperty(ref dash, value);
  40. }
  41. #region 填充
  42. //填充颜色透明度
  43. private double fillOpacity = 1;
  44. public double FillOpacity
  45. {
  46. get { return fillOpacity; }
  47. set => SetProperty(ref fillOpacity, value);
  48. }
  49. //当前填充颜色
  50. private Brush _currentFillColor = new SolidColorBrush(Colors.Transparent);
  51. public Brush CurrentFillColor
  52. {
  53. get { return _currentFillColor; }
  54. set => SetProperty(ref _currentFillColor, value);
  55. }
  56. //填充颜色
  57. private Brush fillColor = new SolidColorBrush(Colors.Transparent);
  58. public Brush FillColor
  59. {
  60. get { return fillColor; }
  61. set { SetProperty(ref fillColor, value); CurrentFillColor = fillColor; }
  62. }
  63. #endregion 填充
  64. #region 边框
  65. //边框颜色透明度
  66. private double _borderOpacity = 1;
  67. public double BorderOpacity
  68. {
  69. get { return _borderOpacity; }
  70. set => SetProperty(ref _borderOpacity, value);
  71. }
  72. private Brush _borderColor = new SolidColorBrush(Colors.Transparent);
  73. public Brush BorderColor
  74. {
  75. get { return _borderColor; }
  76. set { SetProperty(ref _borderColor, value); CurrentBorderColor = _borderColor; }
  77. }
  78. //当前边框颜色
  79. private Brush _currentBorderColor = new SolidColorBrush(Colors.Transparent);
  80. public Brush CurrentBorderColor
  81. {
  82. get { return _currentBorderColor; }
  83. set => SetProperty(ref _currentBorderColor, value);
  84. }
  85. private Brush _fontColor = new SolidColorBrush(Colors.Transparent);
  86. public Brush FontColor
  87. {
  88. get { return _fontColor; }
  89. set { SetProperty(ref _fontColor, value); CurrentFontColor = _fontColor; }
  90. }
  91. //当前边框颜色
  92. private Brush _currentFontColor = new SolidColorBrush(Colors.Transparent);
  93. public Brush CurrentFontColor
  94. {
  95. get { return _currentFontColor; }
  96. set => SetProperty(ref _currentFontColor, value);
  97. }
  98. #endregion
  99. #region 多选
  100. //多选注释:用处 - 多选注释使得下拉框为空内容,刷新最新的UI布局
  101. private bool _isMultiSelected = false;
  102. public bool IsMultiSelected{
  103. get { return _isMultiSelected; }
  104. set => SetProperty(ref _isMultiSelected, value);
  105. }
  106. #endregion
  107. }
  108. }