| 12345678910111213141516171819202122232425262728293031323334 |
- using Avalonia;
- using Avalonia.Controls;
- using Avalonia.Controls.Notifications;
- using Avalonia.Markup.Xaml;
- using Avalonia.Threading;
- using ControlCatalog.ViewModels;
- using System;
- using System.Threading.Tasks;
- namespace ControlCatalog
- {
- public class MainWindow : Window
- {
- public MainWindow()
- {
- this.InitializeComponent();
- this.AttachDevTools();
- //Renderer.DrawFps = true;
- //Renderer.DrawDirtyRects = Renderer.DrawFps = true;
- DataContext = new MainWindowViewModel();
- }
- private void InitializeComponent()
- {
- // TODO: iOS does not support dynamically loading assemblies
- // so we must refer to this resource DLL statically. For
- // now I am doing that here. But we need a better solution!!
- var theme = new Avalonia.Themes.Default.DefaultTheme();
- theme.TryGetResource("Button", out _);
- AvaloniaXamlLoader.Load(this);
- }
- }
- }
|