DialogTitleBar.xaml.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. using System.Windows;
  2. using System.Windows.Controls;
  3. using System.Windows.Input;
  4. namespace PixiEditor.Views.Dialogs
  5. {
  6. public partial class DialogTitleBar : UserControl
  7. {
  8. public static readonly DependencyProperty TitleTextProperty =
  9. DependencyProperty.Register(nameof(TitleText), typeof(string), typeof(DialogTitleBar), new PropertyMetadata(""));
  10. public static readonly DependencyProperty CloseCommandProperty =
  11. DependencyProperty.Register(nameof(CloseCommand), typeof(ICommand), typeof(DialogTitleBar), new PropertyMetadata(null));
  12. public ICommand CloseCommand
  13. {
  14. get { return (ICommand)GetValue(CloseCommandProperty); }
  15. set { SetValue(CloseCommandProperty, value); }
  16. }
  17. public string TitleText
  18. {
  19. get { return (string)GetValue(TitleTextProperty); }
  20. set { SetValue(TitleTextProperty, value); }
  21. }
  22. public DialogTitleBar()
  23. {
  24. InitializeComponent();
  25. }
  26. }
  27. }