private void NavigateToCrumb(Breadcrumb crumb) { IPageViewModel currentPage = m_pageService.CurrentPage; if (crumb.AssociatedPage == currentPage) { return; } while (crumb.AssociatedPage != currentPage) { m_pageService.CloseCurrentPage(); currentPage = m_pageService.CurrentPage; } }
private void UpdateBreadcrumb() { IEnumerable <IPageViewModel> pageHistory = m_pageService.PageHistory.Reverse(); IPageViewModel lastPage = pageHistory.Last(); Breadcrumbs.Clear(); foreach (IPageViewModel page in pageHistory) { Breadcrumb crumb = new Breadcrumb() { Text = page.Title, AssociatedPage = page, IsLastCrumb = lastPage == page }; Breadcrumbs.Add(crumb); } }