Skip to content

Commit bfff7d9

Browse files
committed
Merge pull request AvaloniaUI#7622 from pr8x/child-window-property2
Exposing `Window.ChildWindows` collection
1 parent da3004d commit bfff7d9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Avalonia.Controls/Window.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,11 @@ public Window(IWindowImpl impl)
255255
[CanBeNull]
256256
public new IWindowImpl PlatformImpl => (IWindowImpl)base.PlatformImpl;
257257

258+
/// <summary>
259+
/// Gets a collection of child windows owned by this window.
260+
/// </summary>
261+
public IReadOnlyList<Window> OwnedWindows => _children.Select(x => x.child).ToList();
262+
258263
/// <summary>
259264
/// Gets or sets a value indicating how the window will size itself to fit its content.
260265
/// </summary>

0 commit comments

Comments
 (0)