private void WriteToXElement(DockItemLayoutCollection dockItemLayoutCollection, XElement layoutXml) { foreach (var layout in dockItemLayoutCollection) { if (layout.IsSimple() == false || string.IsNullOrEmpty(layout.ItemName) == false) { layoutXml.Add(WriteToXElement(layout)); } } }
private static void BuildIndices(DockItemLayoutCollection itemLayoutCollection) { var index = 0; foreach (var item in itemLayoutCollection) { DockItemLayout.SetIndex(item, index++); if (item is DockItemGroupLayout groupItemLayout) { BuildIndices(groupItemLayout.Items); } } }