Skip to content

Instantly share code, notes, and snippets.

@JoeM-RP JoeM-RP/App.xaml.cs
Last active Nov 26, 2018

Embed
What would you like to do?
/// <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
You can’t perform that action at this time.