feat(docking): add floating window support
This commit is contained in:
@@ -261,6 +261,7 @@ public class DockingLayout : Control
|
|||||||
|
|
||||||
internal void CreateFloatingWindow(DockDocument doc)
|
internal void CreateFloatingWindow(DockDocument doc)
|
||||||
{
|
{
|
||||||
// To be implemented in Task 6
|
var window = new FloatingWindow(doc);
|
||||||
|
window.Activate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
using Microsoft.UI.Xaml;
|
||||||
|
|
||||||
|
namespace Ghost.Editor.View.Controls.Docking;
|
||||||
|
|
||||||
|
public class FloatingWindow : Window
|
||||||
|
{
|
||||||
|
public FloatingWindow(DockDocument document)
|
||||||
|
{
|
||||||
|
var layout = new DockingLayout();
|
||||||
|
var group = new DockGroup();
|
||||||
|
group.AddChild(document);
|
||||||
|
|
||||||
|
var panel = new DockPanel();
|
||||||
|
panel.AddChild(group);
|
||||||
|
layout.RootPanel = panel;
|
||||||
|
|
||||||
|
Content = layout;
|
||||||
|
|
||||||
|
// Basic window setup
|
||||||
|
AppWindow.Resize(new Windows.Graphics.SizeInt32(800, 600));
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user