MainWindow.xaml.cs 768 B

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