| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- using System.Windows;
- using System.Windows.Controls;
- namespace UniversalControls.Controls;
- /// <summary>
- /// Interaction logic for Header_Content.xaml
- /// </summary>
- public partial class Header_Content : UserControl
- {
- public Header_Content()
- {
- InitializeComponent();
- }
- public object Header
- {
- get { return (object)GetValue(HeaderProperty); }
- set { SetValue(HeaderProperty, value); }
- }
- // Using a DependencyProperty as the backing store for Header. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty HeaderProperty =
- DependencyProperty.Register(nameof(Header), typeof(object), typeof(Header_Content), new PropertyMetadata(default));
- public object DisplayContent
- {
- get { return (object)GetValue(DisplayContentProperty); }
- set { SetValue(DisplayContentProperty, value); }
- }
- // Using a DependencyProperty as the backing store for Content. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty DisplayContentProperty =
- DependencyProperty.Register(nameof(DisplayContent), typeof(object), typeof(Header_Content), new PropertyMetadata("-"));
- public Thickness ContentMargin
- {
- get { return (Thickness)GetValue(ContentMarginProperty); }
- set { SetValue(ContentMarginProperty, value); }
- }
- // Using a DependencyProperty as the backing store for ContentMargin. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty ContentMarginProperty =
- DependencyProperty.Register(nameof(ContentMargin), typeof(Thickness), typeof(Header_Content), new PropertyMetadata(new Thickness(8, 0, 0, 0)));
- public float HeaderWidth
- {
- get { return (float)GetValue(HeaderWidthProperty); }
- set { SetValue(HeaderWidthProperty, value); }
- }
- // Using a DependencyProperty as the backing store for HeaderWidth. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty HeaderWidthProperty =
- DependencyProperty.Register(nameof(HeaderWidth), typeof(float), typeof(Header_Content), new PropertyMetadata(32f));
- }
|