/HomePageViewModel.cs Secret
Created
November 26, 2018 00:22
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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