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.

66 lines
1.8 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.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. namespace BPA.UIControl
  16. {
  17. /// <summary>
  18. /// 页码条子项
  19. /// </summary>
  20. public class PageBarItem : ContentControl
  21. {
  22. static PageBarItem()
  23. {
  24. DefaultStyleKeyProperty.OverrideMetadata(typeof(PageBarItem), new FrameworkPropertyMetadata(typeof(PageBarItem)));
  25. }
  26. #region 命令
  27. /// <summary>
  28. /// 点击页码命令
  29. /// </summary>
  30. public static readonly DependencyProperty PageNumberCommandProperty =
  31. DependencyProperty.Register("PageNumberCommand", typeof(ICommand), typeof(PageBarItem));
  32. /// <summary>
  33. /// 点击页码命令
  34. /// </summary>
  35. public ICommand PageNumberCommand
  36. {
  37. get { return (ICommand)GetValue(PageNumberCommandProperty); }
  38. set { SetValue(PageNumberCommandProperty, value); }
  39. }
  40. #endregion 命令
  41. #region 依赖属性
  42. /// <summary>
  43. /// 值
  44. /// </summary>
  45. public static readonly DependencyProperty ValueProperty =
  46. DependencyProperty.Register("Value", typeof(int), typeof(PageBarItem), new PropertyMetadata(default(int)));
  47. /// <summary>
  48. /// 值
  49. /// </summary>
  50. public int Value
  51. {
  52. get { return (int)GetValue(ValueProperty); }
  53. set { SetValue(ValueProperty, value); }
  54. }
  55. #endregion 依赖属性
  56. }
  57. }