private static void PageCountChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SimplePager page = d as SimplePager; page.CurrentPage = 1; page.svgForward.Visibility = page.CurrentPage == page.PageCount ? Visibility.Hidden : Visibility.Visible; page.SetSelected(page.btnFirst); }
// TODO : ActiveColor DP ? // TODO : InactiveColor DP ? /* Event Handlers * ---------------------------------------------------------------------------------------*/ private static void CurrentPageChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SimplePager page = d as SimplePager; page.svgBack.Visibility = page.CurrentPage == 1 ? Visibility.Hidden : Visibility.Visible; page.svgForward.Visibility = page.CurrentPage == page.PageCount ? Visibility.Hidden : Visibility.Visible; page.RaiseEvent(new RoutedEventArgs(PageChangedEvent, page)); }