0
votes

I'm using Prism navigation (version 6.3.0) on a WPF application,

I've 3 views: ViewA , ViewB and ViewC, after navigating from ViewA to ViewC passing by ViewB I want to remove ViewB from Navigation Journal, to call the GoBack method and navigate directly to ViewA

First Navigation

ViewA -> ViewB -> ViewC

Second Navigation (GoBack)

ViewC -> ViewA

I tried implementing the method OnNavigatedFrom in the following way but it doesn't work:

public override void OnNavigatedFrom(NavigationContext navigationContext)
{
    this.NavigationJournal.Clear();
    var viewAEntry = new RegionNavigationJournalEntry() { Uri = new Uri(ContractNames.Medics, UriKind.Relative) };
    this.NavigationJournal.RecordNavigation(viewAEntry);
    base.OnNavigatedFrom(navigationContext);
}

I've also checked the reported issues on Github ( 30 and 384 ) but seems are without a solution.

Any help would be appreciated.

1

1 Answers

1
votes

This isn't built into the framework just yet, but if you follow the directions in this comment you should be able to implement a solution.

https://github.com/PrismLibrary/Prism/issues/30#issuecomment-227491454

and

https://github.com/PrismLibrary/Prism/issues/30#issuecomment-227679365

That should get you going in the right direction.