I am attempting to store a DevExpress DockPanel in a settings file. Everything appears to work in the save function, but when I go to load it upon starting the application, The Settings.Default.WebLayoutPanel variable is null: here is the save:

Settings.Default.VisibilitySwitchesPanel = _visibilitySwitchesPanel;
and here is the load
if (Settings.Default.WebLayoutPanel != null)
{
_webLayoutPanel = Settings.Default.WebLayoutPanel;
}
Any Ideas as to why it is null?
You should not save the
Controlinstances directly into the application settings. It’s a wrong way. You should save the specific settings of these controls using custom serializable wrapper and then restore these settings. Here is a useful links:As for DevExpress DockPanels, when you want to save/restore the docking layout you should use the embedded save/restore functionality: Saving and Restoring the Layout of Dock Panels