AODL.Document.Styles.MasterStyles.TextPageHeaderFooterBase.Activate C# (CSharp) Method

Activate() public method

This method call will activate resp. create the header or footer for a master page. There is no need of call it directly. Activation for footer and header will be done through the TextMasterPage object.
public Activate ( ) : void
return void
		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);
			}
		}