Ejemplo n.º 1
0
 /// <summary>
 /// Raises the PageSelectedChanged event.  This allows you to provide a custom handler for the event.
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnPageSelectedChanged(PageChangedEventArgs e)
 {
     if (PageSelectedChanged != null)
     {
         PageSelectedChanged(this, e);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Sets the current page index
        /// </summary>
        /// <param name="pageIndex"></param>
        private void GoToPage(int pageIndex)
        {
            // Prepares event data
            PageChangedEventArgs e = new PageChangedEventArgs();

            e.OldPageIndex = CurrentPageIndex;
            e.NewPageIndex = pageIndex;

            // Updates the current index
            CurrentPageIndex = pageIndex;

            // Fires the page changed event
            OnPageSelectedChanged(e);

            // Binds new data
            OnDataBinding(e);
        }