Prathap

Prathap

  • NA
  • 38
  • 32.3k

How to close all opened windows form in Wpf application.

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