Header_Content.xaml.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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_Content.xaml
  18. /// </summary>
  19. public partial class Header_Content : UserControl
  20. {
  21. public Header_Content()
  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_Content), new PropertyMetadata(default));
  33. public object Header
  34. {
  35. get { return (object)GetValue(HeaderProperty); }
  36. set { SetValue(HeaderProperty, value); }
  37. }
  38. // Using a DependencyProperty as the backing store for Header. This enables animation, styling, binding, etc...
  39. public static readonly DependencyProperty HeaderProperty =
  40. DependencyProperty.Register(nameof(Header), typeof(object), typeof(Header_Content), new PropertyMetadata(default));
  41. public object Content
  42. {
  43. get { return (object)GetValue(ContentProperty); }
  44. set { SetValue(ContentProperty, value); }
  45. }
  46. // Using a DependencyProperty as the backing store for Content. This enables animation, styling, binding, etc...
  47. public static readonly DependencyProperty ContentProperty =
  48. DependencyProperty.Register(nameof(Content), typeof(object), typeof(Header_Content), new PropertyMetadata("-"));
  49. public Thickness ContentMargin
  50. {
  51. get { return (Thickness)GetValue(ContentMarginProperty); }
  52. set { SetValue(ContentMarginProperty, value); }
  53. }
  54. // Using a DependencyProperty as the backing store for ContentMargin. This enables animation, styling, binding, etc...
  55. public static readonly DependencyProperty ContentMarginProperty =
  56. DependencyProperty.Register(nameof(ContentMargin), typeof(Thickness), typeof(Header_Content), new PropertyMetadata(new Thickness(8,0,0,0)));
  57. }