I need to close RadWindow(s) which are children of Application.Current.MainWindow programmatically but RadWindows present as "Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper+WindowHostWindow: Window Header" so I'm unable to cast that back to RadWindow and use Close() method. Here is what I tried:
foreach (var w in Application.Current.Windows)
{
var rw = w as RadWindow;
if (rw == null) continue;
rw.Close();
}
foreach (var rw in Application.Current.MainWindow.ChildrenOfType<RadWindow>())
{
rw.Close();
}
So, how exactly do I close RadWindow(s) which are children of Application.Current.MainWindow programmatically?
foreach (var w in Application.Current.Windows)
{
var rw = w as RadWindow;
if (rw == null) continue;
rw.Close();
}
foreach (var rw in Application.Current.MainWindow.ChildrenOfType<RadWindow>())
{
rw.Close();
}
So, how exactly do I close RadWindow(s) which are children of Application.Current.MainWindow programmatically?