AppDelegate.cs 1.2 KB

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