3
Reply

How to close all opened windows form in Wpf application.

Prathap

Prathap

Apr 16 2015 1:52 AM
1.6k
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)