public void Activate()
{
string typeName = (this is TextPageHeader) ? "header" : "footer";
// only if the content node doesn't exist
if (this._contentNode == null)
{
this._contentNode = this.TextDocument.CreateNode(
typeName, "style");
this._textMasterPage.Node.AppendChild(this._contentNode);
}
// only if the property node doesn't exist
if (this._propertyNode == null)
{
this._propertyNode = this.TextDocument.CreateNode(
"header-footer-properties", "style");
// Set defaults
this.MarginLeft = "0cm";
this.MarginRight = "0cm";
this.MinHeight = "0cm";
this.MarginBottom = (typeName.Equals("header")) ? "0.499cm" : "0cm";
this.MarginTop = (typeName.Equals("footer")) ? "0.499cm" : "0cm";
this._styleNode.AppendChild(this._propertyNode);
}
}