Avalonia based Editor for Romhackers

MainView.xaml.cs 702B

1234567891011121314151617181920212223242526272829
  1. using Avalonia.Collections;
  2. using Avalonia.Controls;
  3. using Avalonia.Markup.Xaml;
  4. using Editopia.Editor.Pages;
  5. using System;
  6. using System.Collections;
  7. using System.Collections.Generic;
  8. namespace Editopia.Editor
  9. {
  10. public class MainView : UserControl
  11. {
  12. public MainView()
  13. {
  14. this.InitializeComponent();
  15. }
  16. private void InitializeComponent()
  17. {
  18. AvaloniaXamlLoader.Load(this);
  19. IList tabItems = ((IList)this.FindControl<TabControl>("Sidebar").Items);
  20. tabItems.Add(new TabItem()
  21. {
  22. Header = "Trainer Page",
  23. Content = new EditTrainer()
  24. });
  25. }
  26. }
  27. }