protected override void ReadProperties(ObjectReader reader, XmlElement elem) { // ButtonIconSize is stored as IconSize GladeUtils.RenameProperty(elem, "IconSize", "ButtonIconSize"); base.ReadProperties(reader, elem); toolbarInfo = elem ["node"]; }
protected override XmlElement WriteProperties(ObjectWriter writer) { XmlElement elem = base.WriteProperties(writer); if (writer.Format == FileFormat.Native) { // The style and icon size is already stored in ButtonStyle and ButtonIconSize GladeUtils.ExtractProperty(elem, "ToolbarStyle", ""); GladeUtils.ExtractProperty(elem, "IconSize", ""); // Store ButtonIconSize as IconSize, for backwards compat GladeUtils.RenameProperty(elem, "ButtonIconSize", "IconSize"); if (toolbarInfo != null) { elem.AppendChild(writer.XmlDocument.ImportNode(toolbarInfo, true)); } else { elem.AppendChild(actionTree.Write(writer.XmlDocument, writer.Format)); } } return(elem); }