/// <summary> /// This is page index chnaged event for gird /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void grdLocationListPage_PageIndexChanged(object sender, PageIndexChangedEventArgs e) { int NewPageSize = e.NewPageIndex; if (NewPageSize >= 0) { LocationDeligate.SetValueMethodPageNumber(NewPageSize); } }
void scrollViewer_ScrollChanged(object sender, System.Windows.Controls.ScrollChangedEventArgs e) { int lastOffset = Convert.ToInt32(Application.Current.Properties["FindUserGridLastScrollOffset"] ?? "0"); if (Convert.ToInt32(e.VerticalOffset) > 0 && Convert.ToInt32(e.VerticalOffset) > lastOffset) { Application.Current.Properties["FindUserGridLastScrollOffset"] = e.VerticalOffset; Application.Current.Properties["FindUserGridCurrentPageIndex"] = Convert.ToInt32(Application.Current.Properties["FindUserGridCurrentPageIndex"] ?? "0") + 1; Application.Current.Properties["tempScrollCount"] = 1; LocationDeligate.SetValueMethodPageNumber(Convert.ToInt32(Application.Current.Properties["FindUserGridCurrentPageIndex"] ?? "0")); Application.Current.Properties["tempScrollCount"] = 1; } }