private static void OnPageCountChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DataPager control = (DataPager)d; control.OnPropertyChanged(nameof(IsEnabledNextPage)); }