Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use <code>PhoneApplicationService.State</code></p> <p>It is a <code>Dictionary&lt;String,Object&gt;</code></p> <p><code>PhoneApplicationService.State</code> is commonly used in tombstoning to store the current state of the application. However, it can be used to conveniently pass data between pages.</p> <p><a href="http://msdn.microsoft.com/en-us/library/windowsphone/develop/microsoft.phone.shell.phoneapplicationservice.state%28v=vs.105%29.aspx" rel="nofollow">MSDN documentation</a></p> <blockquote> <p>Windows Phone applications are deactivated when the user navigates to another application. When the user returns to the application, by using the Back button or by completing a Launcher or Chooser task, the application is reactivated. An application can store transient application state in the State dictionary in the handler for the Deactivated event. In the Activated event handler, an application can use the values stored in the State dictionary to transient application state.</p> </blockquote> <p>Basically what you would do is</p> <pre><code>PhoneApplicationService.State.add(selectedName,yourobjectInstance); NavigationService.Navigate((new Uri("/MainPage.xaml?selectedItem="+selectedName,UriKind.Relative)); </code></pre> <p>Then in your navigated too method you can retrieve it</p> <pre><code>YourObject yourObjectInstance; var yourObj = PhoneApplicationService.State["yourObjectName"]; yourObjectInstance = yourObj is YourObject ? (yourObj as YourObject) : null; </code></pre> <p><a href="http://blogs.windows.com/windows_phone/b/wpdev/archive/2010/07/20/understanding-the-windows-phone-application-execution-model-tombstoning-launcher-and-more-part-3.aspx" rel="nofollow">Here is a more indepth look into how to use this feature</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload