SPField.AnnotateField method

SharePoint 2013

When overridden in a derived class, adds attributes to the specified XML node and assigns them values from the properties of this SPField object.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public virtual void AnnotateField(
	XmlNode fieldRefNode


Type: System.Xml.XmlNode

The node that the attributes are added to.

Your override should call the base implementation and then add other attributes (and their values) as needed for your custom field type.