using Lattice.Core.Docking.Engine; using Lattice.Core.Docking.Models; using Lattice.IDE.Controls; using Lattice.Themes; using Microsoft.UI.Xaml; // Предположим, что VS2026Theme тоже реализован аналогично Fluent // using Lattice.Themes.VisualStudio2026; namespace Lattice.IDE; public sealed partial class MainWindow : Window { private LayoutManager _manager; public MainWindow() { this.InitializeComponent(); WindowTracker.Register(this); SystemBackdrop = new Microsoft.UI.Xaml.Media.MicaBackdrop(); InitLattice(); } private void InitLattice() { _manager = new LayoutManager(); // Создаем контент на основе XAML UserControls var solutionExplorer = new DemoContent( "sln", "Solution Explorer", new SolutionExplorerView() ); var editor = new DemoContent( "code_01", "Program.cs", new EditorView() ); // Собираем дерево (как раньше) var leftLeaf = new DockLeaf(); leftLeaf.AddContent(solutionExplorer); var centerLeaf = new DockLeaf() { TabPlacement = TabPlacement.Top, }; centerLeaf.AddContent(editor); var rootGroup = new DockGroup(leftLeaf, centerLeaf, SplitDirection.Horizontal) { SplitRatio = 0.25 }; _manager.SetRoot(rootGroup); DockHost.Manager = _manager; } private void SetFluentTheme(object sender, RoutedEventArgs e) => ThemeManager.Current.ApplyTheme(new FluentThemePack()); private void SetVSTheme(object sender, RoutedEventArgs e) => ThemeManager.Current.ApplyTheme(new VS2026ThemePack()); }