Skip to content

Commit

Permalink
Create pinned dockabled
Browse files Browse the repository at this point in the history
  • Loading branch information
wieslawsoltes committed Nov 12, 2024
1 parent 952259d commit 7509831
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
8 changes: 7 additions & 1 deletion src/Dock.Model.Avalonia/Factory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ public Factory()
public override IList<T> CreateList<T>(params T[] items) => new AvaloniaList<T>(items);

/// <inheritdoc/>
public override IRootDock CreateRootDock() => new RootDock();
public override IRootDock CreateRootDock() => new RootDock
{
LeftPinnedDockables = CreateList<IDockable>(),
RightPinnedDockables = CreateList<IDockable>(),
TopPinnedDockables = CreateList<IDockable>(),
BottomPinnedDockables = CreateList<IDockable>()
};

/// <inheritdoc/>
public override IProportionalDock CreateProportionalDock() => new ProportionalDock();
Expand Down
8 changes: 7 additions & 1 deletion src/Dock.Model.Mvvm/Factory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ public Factory()
public override IList<T> CreateList<T>(params T[] items) => new ObservableCollection<T>(items);

/// <inheritdoc/>
public override IRootDock CreateRootDock() => new RootDock();
public override IRootDock CreateRootDock() => new RootDock
{
LeftPinnedDockables = CreateList<IDockable>(),
RightPinnedDockables = CreateList<IDockable>(),
TopPinnedDockables = CreateList<IDockable>(),
BottomPinnedDockables = CreateList<IDockable>()
};

/// <inheritdoc/>
public override IProportionalDock CreateProportionalDock() => new ProportionalDock();
Expand Down
10 changes: 8 additions & 2 deletions src/Dock.Model.ReactiveUI/Factory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ public Factory()
public override IList<T> CreateList<T>(params T[] items) => new ObservableCollection<T>(items);

/// <inheritdoc/>
public override IRootDock CreateRootDock() => new RootDock();
public override IRootDock CreateRootDock() => new RootDock
{
LeftPinnedDockables = CreateList<IDockable>(),
RightPinnedDockables = CreateList<IDockable>(),
TopPinnedDockables = CreateList<IDockable>(),
BottomPinnedDockables = CreateList<IDockable>()
};

/// <inheritdoc/>
public override IProportionalDock CreateProportionalDock() => new ProportionalDock();
Expand All @@ -65,4 +71,4 @@ public Factory()

/// <inheritdoc/>
public override IRootDock CreateLayout() => CreateRootDock();
}
}

0 comments on commit 7509831

Please sign in to comment.