You can use the Application.Windows property :
foreach( var window in Application.Current.Windows.OfType<MyType>() )
{
}
Like HB, what you need to include System.Linqin order to get the extension method OfType<T>, but this is optional.
Ed S. source
share