Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using DryIoc;
- using Prism.DryIoc;
- using Prism.Logging;
- using Xamarin.Forms;
- namespace PrismForms
- {
- public partial class App : PrismApplication
- {
- public static new App Current => Application.Current as App;
- /// <summary>
- /// Logging provided by <see cref="Prism.Logging"/>
- /// </summary>
- /// <value>The logger</value>
- public new ILoggerFacade Logger
- {
- get { return base.Logger; }
- }
- /// <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)}", animated: false);
- }
- /// <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()
- {
- // Register Navigation page
- Container.RegisterTypeForNavigation<Views.AppShellNavigationPage>("Navigation");
- // Register Views
- Container.RegisterTypeForNavigation<Views.AppShell>("Root");
- Container.RegisterTypeForNavigation<Views.HomePage>();
- Container.RegisterTypeForNavigation<Views.SamplePage>();
- Container.RegisterTypeForNavigation<Views.SettingsPage>();
- }
- /* Omitted */
- }
Add Comment
Please, Sign In to add comment