SummeryPlot.xaml.cs 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. using System.Windows.Input;
  2. using System.Windows.Media;
  3. namespace SummaryModule.Controls;
  4. /// <summary>
  5. /// Interaction logic for SummeryPlot.xaml
  6. /// </summary>
  7. public partial class SummeryPlot : UserControl
  8. {
  9. public SummeryPlot()
  10. {
  11. InitializeComponent();
  12. }
  13. public object DisplayContent
  14. {
  15. get { return (object)GetValue(DisplayContentProperty); }
  16. set { SetValue(DisplayContentProperty, value); }
  17. }
  18. // Using a DependencyProperty as the backing store for DisplayContent. This enables animation, styling, binding, etc...
  19. public static readonly DependencyProperty DisplayContentProperty =
  20. DependencyProperty.Register(nameof(DisplayContent), typeof(object), typeof(SummeryPlot), new PropertyMetadata(default));
  21. public string Title
  22. {
  23. get { return (string)GetValue(TitleProperty); }
  24. set { SetValue(TitleProperty, value); }
  25. }
  26. public static readonly DependencyProperty TitleProperty =
  27. DependencyProperty.Register(nameof(Title), typeof(string), typeof(SummeryPlot), new PropertyMetadata(default));
  28. public ImageSource TitleImage
  29. {
  30. get { return (ImageSource)GetValue(TitleImageProperty); }
  31. set { SetValue(TitleImageProperty, value); }
  32. }
  33. public static readonly DependencyProperty TitleImageProperty =
  34. DependencyProperty.Register(nameof(TitleImage), typeof(ImageSource), typeof(SummeryPlot), new PropertyMetadata(default));
  35. public ICommand Jump
  36. {
  37. get { return (ICommand)GetValue(JumpProperty); }
  38. set { SetValue(JumpProperty, value); }
  39. }
  40. // Using a DependencyProperty as the backing store for Jump. This enables animation, styling, binding, etc...
  41. public static readonly DependencyProperty JumpProperty =
  42. DependencyProperty.Register(nameof(Jump), typeof(ICommand), typeof(SummeryPlot), new PropertyMetadata(default));
  43. public object JumpPara
  44. {
  45. get { return (object)GetValue(JumpParaProperty); }
  46. set { SetValue(JumpParaProperty, value); }
  47. }
  48. // Using a DependencyProperty as the backing store for JumpPara. This enables animation, styling, binding, etc...
  49. public static readonly DependencyProperty JumpParaProperty =
  50. DependencyProperty.Register(nameof(JumpPara), typeof(object), typeof(SummeryPlot), new PropertyMetadata(default));
  51. }