I've got the following code in a window B that is started in its own thread from a window A.
view.Closing += (sender, e) =>
{
view.Visibility = Visibility.Collapsed;
e.Cancel = true;
};
When I close window A window B remains in memory and the application doesn't dispose. How should I go forward make sure that the application is shut down when closing window A.
edit: the window B takes a while to load and build that's why the code is there.