MainWindow.xaml.cs 703 B

12345678910111213141516171819202122232425
  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. }
  13. private void InitializeComponent()
  14. {
  15. // TODO: iOS does not support dynamically loading assemblies
  16. // so we must refer to this resource DLL statically. For
  17. // now I am doing that here. But we need a better solution!!
  18. var theme = new Avalonia.Themes.Default.DefaultTheme();
  19. theme.FindResource("Button");
  20. AvaloniaXamlLoader.Load(this);
  21. }
  22. }
  23. }