From bfff7d9e01a803ad4d970d297c9aa72e00f0566a Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Mon, 21 Feb 2022 21:15:56 +0000 Subject: [PATCH] Merge pull request #7622 from pr8x/child-window-property2 Exposing `Window.ChildWindows` collection --- src/Avalonia.Controls/Window.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Avalonia.Controls/Window.cs b/src/Avalonia.Controls/Window.cs index 4c94b725ea..5f2c7bc7bd 100644 --- a/src/Avalonia.Controls/Window.cs +++ b/src/Avalonia.Controls/Window.cs @@ -255,6 +255,11 @@ namespace Avalonia.Controls [CanBeNull] public new IWindowImpl PlatformImpl => (IWindowImpl)base.PlatformImpl; + /// + /// Gets a collection of child windows owned by this window. + /// + public IReadOnlyList OwnedWindows => _children.Select(x => x.child).ToList(); + /// /// Gets or sets a value indicating how the window will size itself to fit its content. ///