AppDelegate.cs 1.0 KB

1234567891011121314151617181920212223242526272829
  1. using Avalonia;
  2. using Foundation;
  3. using Avalonia.Controls;
  4. using Avalonia.iOS;
  5. using InABox.Avalonia.Platform;
  6. using InABox.Avalonia.Platform.iOS;
  7. namespace PRS.Avalonia.iOS;
  8. // The UIApplicationDelegate for the application. This class is responsible for launching the
  9. // User Interface of the application, as well as listening (and optionally responding) to
  10. // application events from iOS.
  11. [Register("AppDelegate")]
  12. #pragma warning disable CA1711 // Identifiers should not have incorrect suffix
  13. public partial class AppDelegate : AvaloniaAppDelegate<App>
  14. #pragma warning restore CA1711 // Identifiers should not have incorrect suffix
  15. {
  16. protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
  17. {
  18. PlatformTools.Register<IDeviceId, iOS_DeviceId>();
  19. PlatformTools.Register<IAppVersion,iOS_AppVersion>();
  20. PlatformTools.Register<IImageTools, iOS_ImageTools>();
  21. PlatformTools.Register<IPdfRenderer, iOS_PdfRenderer>();
  22. return base.CustomizeAppBuilder(builder)
  23. .WithInterFont();
  24. }
  25. }