c# - How to navigate with objects in windows phone 8? -
i need navigate 1 xaml page object not string ..
present code :
private void border_manipulationstarted(object sender, system.windows.input.manipulationstartedeventargs e) { string uri = "/phonepageone.xaml?text="; uri += txtbox.text; navigationservice.navigate(new uri(uri, urikind.relative)); }
i dont want pass text in url, need pass object instead of below , , way ?
person p = new person(); uri+=p
in first page following:
phoneapplicationservice.current.state["param"] = p; navigationservice.navigate(new uri("/phonepageone.xaml", urikind.relative));
and in second retrieve parameter:
person p = phoneapplicationservice.current.state["param"] person;
the phoneapplicationservice.state
dictionary temporary storage location persists until app deactivated.
other option declare static member in, example, app.xaml.cs
, use save object 1 page , retrieve second one.
Comments
Post a Comment