Receiving parameter in page navigation in modern ui

1k Views Asked by At

I use Modern UI framework, and I use page navigation feature

    var bs = new BBCodeBlock();
    try
    {
        bs.LinkNavigator.Navigate(new Uri("../SomePage.xaml", UriKind.Relative), this);
    }
    catch (Exception error)
    {
        ModernDialog.ShowMessage(error.Message, FirstFloor.ModernUI.Resources.NavigationFailed, MessageBoxButton.OK);
    }

I would like to pass a certain parameter, say "A" to the navigated page and receive it over there.

1

There are 1 best solutions below

0
On

If you use an IoC container, you can get a reference to the ViewModel for SomePage.xaml, and set the parameter there before navigating.