Beispiel #1
0
        /// <summary>
        /// Navigates forward. 
        /// </summary>
        /// <remarks>
        /// This method should either update CurrentPage or raise EndReached event.
        /// </remarks>
        public void NavigateForward()
        {
            var oldPage = CurrentPage;

            if (currentPage < _pages.Count - 1)
                CurrentPage = _pages[++currentPage];
            else if (EndReached != null)
                EndReached(this, new EventArgs());

            oldPage.OnNavigatedFromForward();
            CurrentPage.OnNavigatedTo(NavigationDirection.Forward);

            NotfiyNavigateForwardBackwardMightHaveChanged();
        }
Beispiel #2
0
 /// <summary>
 /// Adds the specified page at the end of the list of pages managed by this WizardPageManager.
 /// </summary>
 /// <param name="view">The view.</param>
 internal void Add(WizardPageViewModelBase view)
 {
     _pages.Add(view);
     if (_pages.Count == 1)
         CurrentPage = _pages[0];
 }
Beispiel #3
0
        /// <summary>
        /// Navigates backward. 
        /// </summary>
        /// <remarks>
        /// This method should either update CurrentPage or raise BeginningReached event.
        /// </remarks>
        public void NavigateBackward()
        {
            var oldPage = CurrentPage;

            if (currentPage > 0)
                CurrentPage = _pages[--currentPage];
            else if (BeginningReached != null)
                BeginningReached(this, new EventArgs());

            oldPage.OnNavigatedFromBackward();
            CurrentPage.OnNavigatedTo(NavigationDirection.Backward);

            NotfiyNavigateForwardBackwardMightHaveChanged();
        }