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.

64 lines
1.9 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;
  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.Effects;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. namespace BPA.UIControl
  17. {
  18. /// <summary>
  19. /// 卡片
  20. /// </summary>
  21. public class Card : ContentControl
  22. {
  23. /// <summary>
  24. /// Initializes a new instance of the <see cref="Card"/> class.
  25. /// </summary>
  26. static Card()
  27. {
  28. DefaultStyleKeyProperty.OverrideMetadata(typeof(Card), new FrameworkPropertyMetadata(typeof(Card)));
  29. }
  30. /// <summary>
  31. /// 圆角半径
  32. /// </summary>
  33. public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.Register(
  34. "CornerRadius", typeof(CornerRadius), typeof(Card), new PropertyMetadata(default(CornerRadius)));
  35. /// <summary>
  36. /// 圆角半径
  37. /// </summary>
  38. public CornerRadius CornerRadius
  39. {
  40. get { return (CornerRadius)GetValue(CornerRadiusProperty); }
  41. set { SetValue(CornerRadiusProperty, value); }
  42. }
  43. /// <summary>
  44. /// 边框阴影
  45. /// </summary>
  46. public static readonly DependencyProperty BorderEffectProperty = DependencyProperty.Register(
  47. "BorderEffect", typeof(Effect), typeof(Card), new PropertyMetadata(default(Effect)));
  48. /// <summary>
  49. /// 边框阴影
  50. /// </summary>
  51. public Effect BorderEffect
  52. {
  53. get { return (Effect)GetValue(BorderEffectProperty); }
  54. set { SetValue(BorderEffectProperty, value); }
  55. }
  56. }
  57. }