Exemplo n.º 1
0
 internal void AddHistoryPoint(JournalEntry journalEntry)
 {
     Requires.NotNull(journalEntry, "journalEntry");
     _forwardStack.Clear();
     if (_currentEntry != null)
     {
         _backStack.Push(_currentEntry);
     }
     _currentEntry = journalEntry;
     UpdateObservables(_currentEntry, NavigationMode.New);
     UpdateNavigationState(_currentEntry);
 }
Exemplo n.º 2
0
 private void UpdateNavigationState(JournalEntry journalEntry)
 {
     if (UseNavigationState && !_suppressNavigationEvent)
     {
         Application.Current.Host.NavigationState = journalEntry.Url;
         if (HtmlPage.IsEnabled)
         {
             HtmlPage.Document.SetProperty("title", journalEntry.Name);
         }
     }
 }
Exemplo n.º 3
0
 private void UpdateObservables(JournalEntry journalEntry, NavigationMode mode)
 {
     OnNavigated(journalEntry.Name, journalEntry.Url, mode);
 }
Exemplo n.º 4
0
        internal void GoForward()
        {
            if (!CanGoForward)
            {
                throw new InvalidOperationException("Cannot GoForward");
            }
            _backStack.Push(_currentEntry);
            _currentEntry = _forwardStack.Pop();

            UpdateObservables(_currentEntry, NavigationMode.Forward);
            UpdateNavigationState(_currentEntry);
        }