public override XmlElement Write(ObjectWriter writer) { XmlElement elem = writer.XmlDocument.CreateElement("action"); elem.SetAttribute("id", Name); WidgetUtils.GetProps(this, elem); WidgetUtils.GetSignals(this, elem); if (writer.CreateUndoInfo) { elem.SetAttribute("undoId", UndoId); } return(elem); }