Ok so I have a WPF application that has a WinForms project in it. My main project is the WPF one. My question is how do I find all of the widows that are children of my Main Window that is WPF?? These Windows can be either WinForm or WPF so i need a way to determine of which type the child is to successfully close said form and all of its potential children.
Thank you in advance for the assistance
I have to guess a little but I think your WinForms forms aren’t actually children of the WPF MainWindow. I don’t see how they could be.
So they’re probably just other non-main Windows in your application, not proper children.
That means you have 2 collections to look at:
System.Windows.Forms.Application.OpenFormsSystem.Windows.Application.Current.WindowsOr maybe
MainWindow.OwnedWindowsfor the WPF side.