DockSite.WindowsClosing is not called when inside a UserControl

Docking/MDI for WPF Forum

Posted 7 months ago by Michael Janulaitis
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 7 months ago]

Comments (1)

Posted 7 months 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 (v2019.1 build 0686) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.