I wanted to make simple navigation with passing data between two frames in Windows Store App.
When i start from MainPage, navigating to BlankPage
private void goTo_BlankPage()
{
this.Frame.Navigate(typeof(BlankPage),multimedia);
}
And then i use BackButton:
<Button x:Name="backButton" Click="GoBack" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}"/>
Everything goes fine.
But when i add:
protected override void OnNavigatedTo(NavigationEventArgs e){}
to BlankPage (so i can handle passed data), and then try to go back from it, i’m getting System.ArgumentNullException.
What may be wrong?
try this
Call
base.OnNavigatedToin the overridenOnNavigatedTomethod.App must be doing something in the base method which it might be needing in case of going back