Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hminaya/c7f0529253cecd0228949f8d0b16aa76 to your computer and use it in GitHub Desktop.
Save hminaya/c7f0529253cecd0228949f8d0b16aa76 to your computer and use it in GitHub Desktop.
PRISM - DestinationPageViewModelWithParams
public class DestinationPageViewModel
{
INavigationService _navigationService;
public DestinationPageViewModel(INavigationService navigationService)
{
BackCommand = new DelegateCommand(OnBack);
_navigationService = navigationService;
}
void OnNavigate()
{
var pars = new NavigationParameters();
pars.Add("id", Title);
_navigationService.NavigateAsync("DestinationPage", pars);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment