MainWindow.xaml.cs 830 B

12345678910111213141516171819202122232425262728
  1. using Avalonia;
  2. using Avalonia.Controls;
  3. using Avalonia.Markup.Xaml;
  4. using System;
  5. namespace ControlCatalog
  6. {
  7. public class MainWindow : Window
  8. {
  9. public MainWindow()
  10. {
  11. this.InitializeComponent();
  12. this.AttachDevTools();
  13. //Renderer.DrawFps = true;
  14. //Renderer.DrawDirtyRects = Renderer.DrawFps = true;
  15. }
  16. private void InitializeComponent()
  17. {
  18. // TODO: iOS does not support dynamically loading assemblies
  19. // so we must refer to this resource DLL statically. For
  20. // now I am doing that here. But we need a better solution!!
  21. var theme = new Avalonia.Themes.Default.DefaultTheme();
  22. theme.TryGetResource("Button", out _);
  23. AvaloniaXamlLoader.Load(this);
  24. }
  25. }
  26. }