mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-05 23:42:58 +02:00
* Reset branch for WPF changes * Convert BMP to PNG; fix link-out-of-scope err * Add snippets for WPF... 6794 files!!!! * Add missing snippets * update file updated between migration * Fix paths to include * update breadcrumb and toc * fix index links * fix index links * fix index links * fix markdown
1.1 KiB
1.1 KiB
title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
| title | ms.date | dev_langs | helpviewer_keywords | ms.assetid | |||
|---|---|---|---|---|---|---|---|
| How to: Get all Windows in an Application | 03/30/2017 |
|
|
f120f06e-993b-4a97-9657-af0d1986981f |
How to: Get all Windows in an Application
This example shows how to get all xref:System.Windows.Window objects in an application.
Example
Every instantiated xref:System.Windows.Window object, whether visible or not, is automatically added to a collection of window references that is managed by xref:System.Windows.Application, and exposed from xref:System.Windows.Application.Windows%2A.
You can enumerate xref:System.Windows.Application.Windows%2A to get all instantiated windows using the following code:
[!code-csharpHOWTOWindowManagementSnippets#GetAllWindows] [!code-vbHOWTOWindowManagementSnippets#GetAllWindows]