Standard-Toolkit icon indicating copy to clipboard operation
Standard-Toolkit copied to clipboard

[Bug]: Unable to detect when a `KrytponPage` instance is closing

Open wiredwiz opened this issue 2 years ago • 0 comments

In my project, the KryptonDockingManager.PageCloseRequest event fires when I undock a document window then click the close button on the floating document window. However, if I click the close button on a docked document window and or use the context menu to close the tab, the event never fires for any closed pages. I do not understand why this is. I have been digging thought the source and using breakpoints to diagnose behavior but I have yet to find a reason for this. I use the following close in my form load event when the app initializes

        // Setup docking functionality
        Workspace = kryptonDockingManager.ManageWorkspace(kryptonDockableWorkspace);
        kryptonDockingManager.ManageControl("Control1", kryptonPanel);
        kryptonDockingManager.ManageFloating(this);

        kryptonDockingManager.AddDockspace("Control1", DockingEdge.Bottom, new KryptonPage[] { NewErrorDisplay() });

Then later when document windows are created, I generate a new KrytponPage with the appropriate control and use the following code to add it to my workspace: kryptonDockingManager.AddToWorkspace("Workspace", new KryptonPage[] { page });

If there is something I am missing, I would love to know. I cannot make heads or tails as to why the event fires for floating document windows but not for docked ones.

wiredwiz avatar Aug 22 '22 00:08 wiredwiz