Skip to content

Instantly share code, notes, and snippets.

@JoeM-RP
Last active November 26, 2018 00:17
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/2bf4d7668e646d3f43e1a0179da630fc to your computer and use it in GitHub Desktop.
Save JoeM-RP/2bf4d7668e646d3f43e1a0179da630fc to your computer and use it in GitHub Desktop.
/// <summary>
/// Logging provided by <see cref="Prism.Logging"/>
/// </summary>
/// <value>The logger</value>
public new ILoggerFacade Logger
{
get { return this.Logger; } // Prism 7
}
/// <summary>
/// With Prism, we navigate using a URI format to preserve the stack. We can also
/// reset or rearrage the stack by manipulating the URI, or perform "deep linking"
/// when the app is launched with parameters (i.e - email link, push notification, etc)
/// </summary>
protected override void OnInitialized()
{
InitializeComponent();
NavigationService.NavigateAsync($"myapp:///Root/Navigation/{nameof(Views.HomePage)}");
}
/// <summary>
/// Registers the types. Notice that we can set the name explicity by providing the
/// name parameter, or just use the nameof property for the page
/// </summary>
protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
// Register Navigation page
containerRegistry.RegisterForNavigation<Views.AppShellNavigationPage>("Navigation");
// Register Views
containerRegistry.RegisterForNavigation<Views.AppShell>("Root");
containerRegistry.RegisterForNavigation<Views.HomePage>();
containerRegistry.RegisterForNavigation<Views.SamplePage>();
containerRegistry.RegisterForNavigation<Views.SettingsPage>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment