SyntaxFix
Write A Post
Hire A Developer
Questions
it may be late, but here is my answer
foreach (Window item in Application.Current.Windows) { if (item.DataContext == this) item.Close(); }