You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.3 KiB

  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.Controls;
  7. using System.Windows;
  8. namespace BPA.UIControl
  9. {
  10. /// <summary>
  11. /// 展示控件
  12. /// </summary>
  13. public class ControlDisplay : ContentControl
  14. {
  15. static ControlDisplay()
  16. {
  17. DefaultStyleKeyProperty.OverrideMetadata(typeof(ControlDisplay), new FrameworkPropertyMetadata(typeof(ControlDisplay)));
  18. }
  19. public static readonly DependencyProperty TitleProperty =
  20. DependencyProperty.Register("Title", typeof(string), typeof(ControlDisplay), new PropertyMetadata(null));
  21. /// <summary>
  22. /// 标题
  23. /// </summary>
  24. public string Title
  25. {
  26. get { return (string)GetValue(TitleProperty); }
  27. set { SetValue(TitleProperty, value); }
  28. }
  29. public static readonly DependencyProperty DescriptionProperty =
  30. DependencyProperty.Register("Description", typeof(string), typeof(ControlDisplay), new PropertyMetadata(null));
  31. /// <summary>
  32. /// 描述
  33. /// </summary>
  34. public string Description
  35. {
  36. get { return (string)GetValue(DescriptionProperty); }
  37. set { SetValue(DescriptionProperty, value); }
  38. }
  39. }
  40. }