using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; namespace Task1.ViewModel { class Helper { private static TaskContext context; public static void CloseWindowsAtType() { foreach(var t in App.Current.Windows) { if(t is T) { ((Window)t).Close(); } } } } }