StepBarItem.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System.Windows;
  2. using HandyControl.Data;
  3. namespace HandyControl.Controls;
  4. /// <summary>
  5. /// 步骤条单元项
  6. /// </summary>
  7. public class StepBarItem : SelectableItem
  8. {
  9. /// <summary>
  10. /// 步骤编号
  11. /// </summary>
  12. public static readonly DependencyProperty IndexProperty = DependencyProperty.Register(
  13. nameof(Index), typeof(int), typeof(StepBarItem), new PropertyMetadata(-1));
  14. /// <summary>
  15. /// 步骤编号
  16. /// </summary>
  17. public int Index
  18. {
  19. get => (int) GetValue(IndexProperty);
  20. internal set => SetValue(IndexProperty, value);
  21. }
  22. /// <summary>
  23. /// 步骤状态
  24. /// </summary>
  25. public static readonly DependencyProperty StatusProperty = DependencyProperty.Register(
  26. nameof(Status), typeof(StepStatus), typeof(StepBarItem), new PropertyMetadata(StepStatus.Waiting));
  27. /// <summary>
  28. /// 步骤状态
  29. /// </summary>
  30. public StepStatus Status
  31. {
  32. get => (StepStatus) GetValue(StatusProperty);
  33. internal set => SetValue(StatusProperty, value);
  34. }
  35. }