Window.OwnedWindows Property

Definition

Gets a collection of windows for which this window is the owner.

public System.Windows.WindowCollection OwnedWindows { get; }

Property Value

A WindowCollection that contains references to the windows for which this window is the owner.

Examples

The following example shows how to enumerate OwnedWindows.

foreach (Window ownedWindow in this.OwnedWindows)
{
    Console.WriteLine(ownedWindow.Title);
}

Remarks

An owned window is one whose Owner property is set with a reference to another window, which is known as the owner window. To find all the windows that an owner window owns, you can enumerate WindowCollection that is returned by the OwnedWindows property.

Applies to

제품 버전
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9