DamageRangeControl.xaml.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. using System.Windows;
  2. using System.Windows.Controls;
  3. namespace SWRIS.Controls
  4. {
  5. /// <summary>
  6. /// DamageRangeControl.xaml 的交互逻辑
  7. /// </summary>
  8. public partial class DamageRangeControl : UserControl
  9. {
  10. public DamageRangeControl()
  11. {
  12. InitializeComponent();
  13. }
  14. #region 依赖属性
  15. public static readonly DependencyProperty MildCountProperty =
  16. DependencyProperty.Register("MildCount", typeof(string), typeof(DamageRangeControl), new PropertyMetadata("0"));
  17. public static readonly DependencyProperty LightCountProperty =
  18. DependencyProperty.Register("LightCount", typeof(string), typeof(DamageRangeControl), new PropertyMetadata("0"));
  19. public static readonly DependencyProperty ModerateCountProperty =
  20. DependencyProperty.Register("ModerateCount", typeof(string), typeof(DamageRangeControl), new PropertyMetadata("0"));
  21. public static readonly DependencyProperty SevereCountProperty =
  22. DependencyProperty.Register("SevereCount", typeof(string), typeof(DamageRangeControl), new PropertyMetadata("0"));
  23. public static readonly DependencyProperty CriticalCountProperty =
  24. DependencyProperty.Register("CriticalCount", typeof(string), typeof(DamageRangeControl), new PropertyMetadata("0"));
  25. public static readonly DependencyProperty ExtremeCountProperty =
  26. DependencyProperty.Register("ExtremeCount", typeof(string), typeof(DamageRangeControl), new PropertyMetadata("0"));
  27. #endregion
  28. #region 属性包装器
  29. public string MildCount
  30. {
  31. get { return (string)GetValue(MildCountProperty); }
  32. set { SetValue(MildCountProperty, value); }
  33. }
  34. public string LightCount
  35. {
  36. get { return (string)GetValue(LightCountProperty); }
  37. set { SetValue(LightCountProperty, value); }
  38. }
  39. public string ModerateCount
  40. {
  41. get { return (string)GetValue(ModerateCountProperty); }
  42. set { SetValue(ModerateCountProperty, value); }
  43. }
  44. public string SevereCount
  45. {
  46. get { return (string)GetValue(SevereCountProperty); }
  47. set { SetValue(SevereCountProperty, value); }
  48. }
  49. public string CriticalCount
  50. {
  51. get { return (string)GetValue(CriticalCountProperty); }
  52. set { SetValue(CriticalCountProperty, value); }
  53. }
  54. public string ExtremeCount
  55. {
  56. get { return (string)GetValue(ExtremeCountProperty); }
  57. set { SetValue(ExtremeCountProperty, value); }
  58. }
  59. #endregion
  60. }
  61. }