wpf - How to close a window in c# -


i've got following code in window b started in own thread window a.

view.closing += (sender, e) => {     view.visibility = visibility.collapsed;     e.cancel = true; }; 

when close window window b remains in memory , application doesn't dispose. how should go forward make sure application shut down when closing window a.

edit: window b takes while load , build that's why code there.

use application.exit();

for wpf: application.current.shutdown();


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -