Looneystar
Looneystar

Reputation: 161

WinRT xaml / c# return navigation parameter from page on GoBack

I am trying to create an Entry page, and one of the options is to select an Item. the list can go more than a 1000 and it makes sense to show the search enabled page where the items are listed. When the user clicks the "select item" from the Edit / create screen, I can pass the navigation parameter to that screen, and on selecting the item i can do a Frame.GoBack(). However, i cant pass any parameter back to the page. Is there a better way to do this?

At the moment I am thinking of using Global variables to store this data :(

Upvotes: 3

Views: 1182

Answers (1)

Damien
Damien

Reputation: 2901

Have you tried looking at the LayoutAwarePage.cs class in the Common folder and looking into the:

protected virtual void GoBack(object sender, RoutedEventArgs e)
{
    if ((base.get_Frame() != null) && base.get_Frame().get_CanGoBack())
    {
        base.get_Frame().GoBack();
    }
}

to see if you can pass an object?

Upvotes: 1

Related Questions