3
Answers

How to close all opened windows form in Wpf application.

Prathap

Prathap

9y
1.6k
1
I want to close all opened Forms which are child's of  a WPF window. 
 
WindowCollection windCollect = this.OwnedWindows; 
foreach (Window wind in windCollect)
wind.Close();
 
It will close all WPF windows, but i need to close Forms also. Someone please help.  
 
Answers (3)