In my WPF application I have created a window and show it as a dialog by calling it by the method ShowDialog(). But when I close the window by Close() method the Unloaded event is not fired for this dialog window.
MyWindow obj = new MyWindow();
obj.ShowDialog();
obj.Close();
That’s a known issue.
Use this instead
Read this for more details
Edit
If above is not working try this