using System.Reflection; namespace Neighbourhood.omg.lol { public partial class App : Application { public static Assembly Assembly { get; } = Assembly.GetExecutingAssembly(); public static string Name { get; } = App.Assembly.GetName().Name!; public static string Version { get; } = App.Assembly.GetName().Version!.ToString(); public App(NavigatorService navigatorService) { InitializeComponent(); NavigatorService = navigatorService; } internal NavigatorService NavigatorService { get; private set; } protected override Window CreateWindow(IActivationState? activationState) { // always create new windows. This allows share intents to not crash on android // (with the side effect that multiple windows are opened, which is messy but better than a crash) NavigatorService.Page = new AppShell(); return new Window(NavigatorService.Page); } } }