I have application UWP
Left screen is SplitView.Pane with list content.
Right screen is SplitView.Content, contain detail of content.
<SplitView.Content>
<Frame x:Name="frMainFrame">
<Frame.ContentTransitions>
<TransitionCollection>
<NavigationThemeTransition />
</TransitionCollection>
</Frame.ContentTransitions>
</Frame>
</SplitView.Content>
When im clicked into title on the SplitView.pane, frMainFrame will navigate into ListThread page with parameter is "id"
frMainFrame.Navigate(typeof(ListThread), id);
Method handled Back button
private void OnBackRequested(object sender, BackRequestedEventArgs e)
{
if (frMainFrame.CanGoBack)
{
e.Handled = true;
frMainFrame.GoBack(new SuppressNavigationTransitionInfo());
}
else
{
DialogResult.AskToExitApp();
}
}
On ListThread page,
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (e.NavigationMode != NavigationMode.Back)
{
idBox = (int)e.Parameter;
Idpage = 1;
AnalyzeUrlBox();
AnalyzeHtml();
}
}
and set NavigatitonCacheMode is Required on Constructor method:
this.NavigationCacheMode = NavigationCacheMode.Required;
Now,
- I'm click on Modding and wait for content load complete.(frMainFrame will navigate in to ListThread with Parameter Id = 2)
- I'm click on AMD and wait for content load complete.(frMainFrame will navigate in to ListThread with Parameter Id = 3)
I'm click on Back button on the top corner left.
Require: frMainFrame navigate display ListThread with Parameter Id = 2, restore all state before navigate
Actual: frMainFrame stuck on ListThread with Parameter Id = 3
I think, the problem lies in NavigationCacheMode. How to what to execute same as Require?
Thanks!