private void HandleBackForwardStateChange(object sender, EventArgs args) { if (!this.HasTravelLogIntegration) { return; } IBrowserCallbackServices browser = RootBrowserWindow.Browser; if (browser != null) { browser.UpdateBackForwardState(); } }
/// <summary> /// We are not using the CanGoBack/CanGoForward property change since that is fired only /// if the value changes eg. if we had 3 entries in the backstack, then a back navigation /// won't fire this since the value is still 'true' and has not changed. /// What we need is the UpdateView() notification or the BackForwardState change /// notification which is fired from UpdateView() of the Journal. /// Trying to hook the event will create the journal even if there was no navigation /// so just using an virtual override to do the work. /// </summary> private void HandleBackForwardStateChange(object sender, EventArgs args) { //Nothing to do for downlevel platform if (!HasTravelLogIntegration) { return; } IBrowserCallbackServices ibcs = Browser; if (ibcs != null) { ibcs.UpdateBackForwardState(); } }