This project has moved. For the latest updates, please go here.

DockManagerWorkspace smartpart does not active properly


If you open a panel and then close the panel with the panel close button, you can not open the panel again until you open a different smartpart. It looks like when the panel is closed the ActiveSmartPart still references that panel.


irsalmashhor wrote Nov 23, 2009 at 10:44 AM

Hi I have the same issue and figured out a workaround. Basically you need to "hide" the smartpart when the panel is being closed. It seems to be working for me but I haven't tested it diligently. Let me know if it works for everyone else
private DockPanel CreateDockPanel(Control control, DockManagerSmartPartInfo smartPartInfo, DockPanel dockPanel)
        .... (existing code)...

        // New Code at the end before return
        dockPanel.ClosedPanel += new DockPanelEventHandler(dockPanel_ClosedPanel);
        return dockPanel;
// Event handler code
void dockPanel_ClosedPanel(object sender, DockPanelEventArgs e)
        foreach (var smartPart in SmartParts)
            if (dockPanelDictionary[smartPart as Control] == e.Panel)