MainWindow.xaml.cs 694 B

123456789101112131415161718192021222324252627
  1. using Perspex;
  2. using Perspex.Controls;
  3. using Perspex.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 Perspex.Themes.Default.DefaultTheme();
  19. theme.FindResource("Button");
  20. this.LoadFromXaml();
  21. }
  22. }
  23. }