DockSite.WindowsClosing is not called when inside a UserControl

Docking/MDI for WPF Forum

Posted 5 years ago by Michael Janulaitis - Corner Bowl Software
Version: 19.1.0673
Avatar

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]

Comments (1)

Posted 5 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Michael,

I don't believe we have anything that watches for Shutdown or would raise WindowClosing as the main Window closes.  You might want to go back to your original scenario and check the call stack to see what triggers the event.  Perhaps some code on your side was closing docking windows in that scenario?


Actipro Software Support

The latest build of this product (v24.1.3) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.