Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you want only to pass a variable you can use NavigationService to pass it - for example do it like this:<BR> On the first page, when Navigating (I assume your Q is the variable you want to pass):</p> <pre><code>string myQ = Q.ToString(); NavigationService.Navigate(new Uri("/secondPage.xaml?Q=" + myQ, UriKind.Relative)); </code></pre> <p>On the second page, in OnNavigatingTo() read that variable:</p> <pre><code>string myQ; NavigationContext.QueryString.TryGetValue("myQ", out myQ); // it's string so you probably need to for example Q = int.Parse(myQ); </code></pre> <p>If you want to send more complex objects you can do it like <a href="http://www.kunal-chowdhury.com/2013/10/passing-object-to-wp-navigation-service.html" rel="nofollow noreferrer">here</a> - you can write an extension:</p> <pre><code>public static class Extensions { private static object Data; public static void Navigate(this NavigationService navigationService, Uri source, object data) { Data = data; navigationService.Navigate(source); } public static object GetNavigationData(this NavigationService service) { return Data; } } </code></pre> <p>Usage:</p> <pre><code>NavigationService.Navigate(new Uri("/Page2.xaml", UriKind.RelativeOrAbsolute), ErrorCorrectionLevel.H); </code></pre> <p>Then after Navigating you use:</p> <pre><code>object myQ = NavigationService.GetNavigationData(); ErrorCorrection fromPreviousPage = (ZXing.QrCode.Internal.ErrorCorrectionLevel)myQ; </code></pre> <p>You can also read some more <a href="https://stackoverflow.com/questions/20004086/is-there-a-typesafe-way-of-navigating-between-screens-in-windows-phone">here</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. 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