public static SavedTabGroupsState FromXml(XElement child) { var savedState = new SavedTabGroupsState(); savedState.Index = (int)child.Attribute("index"); savedState.IsHorizontal = (bool)child.Attribute("is-horizontal"); foreach (var group in child.Elements("TabGroup")) { savedState.Groups.Add(SavedTabGroupState.FromXml(group)); } return(savedState); }
public static SavedTabGroupState FromXml(XElement child) { var savedState = new SavedTabGroupState(); savedState.Index = (int)child.Attribute("index"); foreach (var tab in child.Elements("Tab")) { var tabState = SavedTabState.FromXml(tab); if (tabState != null) { savedState.Tabs.Add(tabState); } } return(savedState); }