Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TabContainerActiveChildNotSetException Class

Occurs when the DockPanel.ActiveChild property of the restored tab container is not specified.

Namespace: DevExpress.XtraBars.Docking

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public class TabContainerActiveChildNotSetException :
    RestoreLayoutException

#Remarks

Follow the steps below to fix this exception:

  1. Handle the DockManager.RestoreLayoutError event.
  2. Assign a panel from the container to the ActiveChild property.
void dockManager1_RestoreLayoutError(object sender, DevExpress.Utils.Serializing.RestoreLayoutErrorEventArgs e) {
    foreach (var exception in e.Exceptions) {
        if (exception is TabContainerActiveChildNotSetException activeChildException)
            activeChildException.Panel.ActiveChild = activeChildException.Panels[1];
    }
    e.Throw = false;
}

#Inheritance

Object
Exception
SystemException
InvalidOperationException
DevExpress.Utils.Serializing.RestoreLayoutException
TabContainerActiveChildNotSetException
See Also