I have a docksite which when attached to my main window the WindowsClosing is called after calling Application.Current.Shutdown();, however, I just moved the docksite to a UserControl that is loaded once my user logs into my application. Now when I call Application.Current.Shutdown(); the WindowsClosing event is not triggered.
public partial class MainControl : UserControl
{
public MainControl()
{
InitializeComponent();
dockSite.WindowsClosing += DockSite_WindowsClosing;
}
}
[Modified 5 years ago]