Header_Progress.xaml.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. namespace SummaryModule.Controls;
  16. /// <summary>
  17. /// Interaction logic for Header_Progress.xaml
  18. /// </summary>
  19. public partial class Header_Progress : UserControl
  20. {
  21. public Header_Progress()
  22. {
  23. InitializeComponent();
  24. }
  25. public string Header
  26. {
  27. get { return (string)GetValue(HeaderProperty); }
  28. set { SetValue(HeaderProperty, value); }
  29. }
  30. // Using a DependencyProperty as the backing store for Header. This enables animation, styling, binding, etc...
  31. public static readonly DependencyProperty HeaderProperty =
  32. DependencyProperty.Register(nameof(Header), typeof(string), typeof(Header_Progress), new PropertyMetadata(default));
  33. public float Value
  34. {
  35. get { return (float)GetValue(ValueProperty); }
  36. set { SetValue(ValueProperty, value); }
  37. }
  38. // Using a DependencyProperty as the backing store for Value. This enables animation, styling, binding, etc...
  39. public static readonly DependencyProperty ValueProperty =
  40. DependencyProperty.Register(nameof(Value), typeof(float), typeof(Header_Progress), new PropertyMetadata(0f));
  41. public float Max
  42. {
  43. get { return (float)GetValue(MaxProperty); }
  44. set { SetValue(MaxProperty, value); }
  45. }
  46. // Using a DependencyProperty as the backing store for Max. This enables animation, styling, binding, etc...
  47. public static readonly DependencyProperty MaxProperty =
  48. DependencyProperty.Register(nameof(Max), typeof(float), typeof(Header_Progress), new PropertyMetadata(100f));
  49. }