Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 886 Bytes

File metadata and controls

42 lines (31 loc) · 886 Bytes

WhiteLabel Navigation

To navigate from ViewModel to ViewModel you can use the following code:

Navigation

Simple Navigation

var _pageNavigationService = new PageNavigationService(viewLocator, jsonSerializer);

_pageNavigationService
    .For<MainPageViewModel>()
    .Navigate();

Navigation with parameter

_pageNavigationService
    .For<MainPageViewModel>()
    .WithParam(x => x.ParameterName, parameterValue)
    .Navigate(shouldClearBackstack);

Navigation with several parameters

_pageNavigationService
    .For<MainPageViewModel>()
    .WithParam(x => x.Name, "Sherlock Holmes")
    .WithParam(x => x.Age, 25)
    .WithParam(x => x.Gender, null)
    .Navigate(shouldClearBackstack);
IMPORTANT

Use only simple models as parameters, because they can be de/serialized.