using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace BPA.UIControl { /// /// 页码条子项 /// public class PageBarItem : ContentControl { static PageBarItem() { DefaultStyleKeyProperty.OverrideMetadata(typeof(PageBarItem), new FrameworkPropertyMetadata(typeof(PageBarItem))); } #region 命令 /// /// 点击页码命令 /// public static readonly DependencyProperty PageNumberCommandProperty = DependencyProperty.Register("PageNumberCommand", typeof(ICommand), typeof(PageBarItem)); /// /// 点击页码命令 /// public ICommand PageNumberCommand { get { return (ICommand)GetValue(PageNumberCommandProperty); } set { SetValue(PageNumberCommandProperty, value); } } #endregion 命令 #region 依赖属性 /// /// 值 /// public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(int), typeof(PageBarItem), new PropertyMetadata(default(int))); /// /// 值 /// public int Value { get { return (int)GetValue(ValueProperty); } set { SetValue(ValueProperty, value); } } #endregion 依赖属性 } }