Application.Windows Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets a collection of the Window instances that have been created.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public ReadOnly Property Windows As WindowCollection
public WindowCollection Windows { get; }

Property Value

Type: System.Windows.WindowCollection
A collection of the windows used by the application.

Exceptions

Exception Condition
NotSupportedException

The application is not running outside the browser.

UnauthorizedAccessException

The current thread is not the user interface (UI) thread.

Remarks

A Window instance is automatically added to this collection as soon as it is created, and is automatically removed after its Closing event has been handled. The first Window in the collection is the MainWindow.

Version Information

Silverlight

Supported in: 5

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.