public void CreateLayout(string name, bool copyCurrent) { DockLayout dl; if (container.Layout == null || !copyCurrent) { dl = GetDefaultLayout(); } else { container.StoreAllocation(); dl = (DockLayout)container.Layout.Clone(); } dl.Name = name; layouts [name] = dl; }