AppDelegate.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Diagnostics;
  4. using System.Linq;
  5. using Foundation;
  6. using Avalonia.Controls;
  7. using Avalonia.iOS;
  8. using Avalonia.Media;
  9. using Avalonia.Threading;
  10. using UIKit;
  11. namespace Avalonia.iOSTestApplication
  12. {
  13. // The UIApplicationDelegate for the application. This class is responsible for launching the
  14. // User Interface of the application, as well as listening (and optionally responding) to
  15. // application events from iOS.
  16. [Register("AppDelegate")]
  17. public partial class AppDelegate : UIApplicationDelegate
  18. {
  19. public override UIWindow Window { get; set; }
  20. //
  21. // This method is invoked when the application has loaded and is ready to run. In this
  22. // method you should instantiate the window, load the UI into it and then make the window
  23. // visible.
  24. //
  25. // You have 17 seconds to return from this method, or iOS will terminate your application.
  26. //
  27. public override bool FinishedLaunching(UIApplication uiapp, NSDictionary options)
  28. {
  29. AppBuilder.Configure<SimpleApp>().UseSkia().UseiOS().SetupWithoutStarting();
  30. Window = new AvaloniaWindow { Content = new SimpleControl()};
  31. Window.MakeKeyAndVisible();
  32. return true;
  33. }
  34. }
  35. }