//回调函数
private static void TotalPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
((PagingDataGrid)d).RaisePageChanged();
}
/// <summary>
/// 依赖属性
/// </summary>
public static readonly DependencyProperty TotalProperty =
DependencyProperty.Register(
"Total",
typeof(int),
typeof(PagingDataGrid),
new FrameworkPropertyMetadata(
0,
FrameworkPropertyMetadataOptions.AffectsMeasure,
new PropertyChangedCallback(TotalPropertyChanged))
);
WPF当本类依赖属性发生变化时触发回调函数PropertyChangeCallBackHandler
最新推荐文章于 2024-06-20 13:07:09 发布