App.xaml.cs 890 B

123456789101112131415161718192021222324252627282930
  1. // Copyright (c) The Avalonia Project. All rights reserved.
  2. // Licensed under the MIT license. See licence.md file in the project root for full license information.
  3. using Avalonia;
  4. using Avalonia.Logging.Serilog;
  5. using Avalonia.Markup.Xaml;
  6. using Avalonia.ReactiveUI;
  7. namespace RenderDemo
  8. {
  9. public class App : Application
  10. {
  11. public override void Initialize()
  12. {
  13. AvaloniaXamlLoader.Load(this);
  14. }
  15. // TODO: Make this work with GTK/Skia/Cairo depending on command-line args
  16. // again.
  17. static void Main(string[] args) => BuildAvaloniaApp().Start<MainWindow>();
  18. // App configuration, used by the entry point and previewer
  19. static AppBuilder BuildAvaloniaApp()
  20. => AppBuilder.Configure<App>()
  21. .UsePlatformDetect()
  22. .UseReactiveUI()
  23. .LogToDebug();
  24. }
  25. }