Skip to content

Instantly share code, notes, and snippets.

@JoeM-RP
Created November 26, 2018 00:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoeM-RP/6b18f2f13c7bdf01ddc565c6b2699bc3 to your computer and use it in GitHub Desktop.
Save JoeM-RP/6b18f2f13c7bdf01ddc565c6b2699bc3 to your computer and use it in GitHub Desktop.
private async void Navigate(CopyItem parameter)
{
// Pass the parameters as part of the navigation string. A typical example would be to pass only the ID of an object, which
// the resulting page would lookup/resolve via a service
await _navigationService.NavigateAsync($"{nameof(Views.SamplePage)}?subject={parameter.Title}&content={parameter.Body}");
// Or, we can declare them explicity using a strongly typed object, which is ideal for passing
// a more complex model that the next page won't lookup on its own
/*
var payload = new NavigationParameters();
payload.Add("content", parameter);
await _navigationService.NavigateAsync($"Navigation/{nameof(Views.SamplePage)}", payload);
*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment