![Avatar](https://secure.gravatar.com/avatar/1241ed87da44a509db384578fef65ed2.jpg?s=64&d=identicon&r=g)
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 4 years ago]