AlarmConditionTable.xaml.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System.Windows;
  2. using System.Windows.Controls;
  3. namespace ParameterModule.Controls;
  4. /// <summary>
  5. /// Interaction logic for AlarmConditionTable.xaml
  6. /// </summary>
  7. public partial class AlarmConditionTable : UserControl
  8. {
  9. public AlarmConditionTable()
  10. {
  11. InitializeComponent();
  12. }
  13. public IEnumerable<AlarmPair> Source
  14. {
  15. get { return (IEnumerable<AlarmPair>)GetValue(SourceProperty); }
  16. set { SetValue(SourceProperty, value); }
  17. }
  18. // Using a DependencyProperty as the backing store for Source. This enables animation, styling, binding, etc...
  19. public static readonly DependencyProperty SourceProperty =
  20. DependencyProperty.Register(nameof(Source), typeof(IEnumerable<AlarmPair>), typeof(AlarmConditionTable), new PropertyMetadata(default));
  21. public string Title
  22. {
  23. get { return (string)GetValue(TitleProperty); }
  24. set { SetValue(TitleProperty, value); }
  25. }
  26. // Using a DependencyProperty as the backing store for Title. This enables animation, styling, binding, etc...
  27. public static readonly DependencyProperty TitleProperty =
  28. DependencyProperty.Register(nameof(Title), typeof(string), typeof(AlarmConditionTable), new PropertyMetadata(default));
  29. }