#region Formatting Methods
/// <summary>
/// Write the title paragraph properties to the WordprocessingML document.
/// </summary>
/// <param name="writer">The XmlWriter to write the properties to.</param>
private void WriteTitleParagraphProperties(XmlWriter writer) {
// Create the paragraph properties element.
// </w:pPr>
writer.WriteStartElement(wordPrefix, "pPr",
wordNamespace);
// Create the bottom border.
// <w:pBdr>
// <w:bottom w:val=”single” w:sz=”4”
// w:space=”1” w:color=”auto” />
// </w:pBdr>
writer.WriteStartElement(wordPrefix, "pBdr", wordNamespace);
writer.WriteStartElement(wordPrefix, "bottom", wordNamespace);
writer.WriteAttributeString(wordPrefix, "val", wordNamespace, "single");
writer.WriteAttributeString(wordPrefix, "sz", wordNamespace, "4");
writer.WriteAttributeString(wordPrefix, "space", wordNamespace, "1");
writer.WriteAttributeString(wordPrefix, "color", wordNamespace, "blue");
writer.WriteEndElement();
writer.WriteEndElement();
// Define the spacing for the paragraph.
// <w:spacing w:line=”240” w:lineRule=”auto” />
writer.WriteStartElement(wordPrefix, "spacing", wordNamespace);
writer.WriteAttributeString(wordPrefix, "line", wordNamespace, "240");
writer.WriteAttributeString(wordPrefix, "lineRule", wordNamespace, "auto");
writer.WriteEndElement();
// Close the properties element.
// </w:pPr>
writer.WriteEndElement();
}
/// <summary>
/// Write the title run properties to the WordprocessingML document.
/// </summary>
/// <param name="writer">The XmlWriter to write the properties to.</param>
private void WriteTitleRunProperties(XmlWriter writer) {
// Create the run properties element.
// <w:rPr>
writer.WriteStartElement(wordPrefix, "rPr", wordNamespace);
// Set up the spacing.
// <w:spacing w:val=”5” />
writer.WriteStartElement(wordPrefix, "spacing", wordNamespace);
writer.WriteAttributeString(wordPrefix, "val", wordNamespace, "5");
writer.WriteEndElement();
// Define the size.
// <w:sz w:val=”52” />
writer.WriteStartElement(wordPrefix, "sz", wordNamespace);
writer.WriteAttributeString(wordPrefix, "val", wordNamespace, "52");
writer.WriteEndElement();
// Close the properties element.
// </w:rPr>
writer.WriteEndElement();
}
/// <summary>
/// Write the subtitle paragraph properties to the WordprocessingML document.
/// </summary>
/// <param name="writer">The XmlWriter to write the properties to.</param>
private void WriteSubtitleParagraphProperties(XmlWriter writer) {
// Create the paragraph properties element.
// <w:pPr>
writer.WriteStartElement(wordPrefix, "pPr", wordNamespace);
// Define the spacing for the paragraph.
// <w:spacing w:before=”200” w:after=”0” />
writer.WriteStartElement(wordPrefix, "spacing", wordNamespace);
writer.WriteAttributeString(wordPrefix, "before", wordNamespace, "200");
writer.WriteAttributeString(wordPrefix, "after", wordNamespace, "0");
writer.WriteEndElement();
// Close the properties element.
// </w:pPr>
writer.WriteEndElement();
}
/// <summary>
/// Write the subtitle run properties to the WordprocessingML document.
/// </summary>
/// <param name="writer">The XmlWriter to write the properties to.</param>
private void WriteSubtitleRunProperties(XmlWriter writer) {
// Create the run properties element.
// <w:rPr>
writer.WriteStartElement(wordPrefix, "rPr", wordNamespace);
// setup as bold
// <w:b />
writer.WriteElementString(wordPrefix, "b", wordNamespace, null);
// Define the size.
// <sz w:val=”26” />
writer.WriteStartElement(wordPrefix, "sz", wordNamespace);
writer.WriteAttributeString(wordPrefix, |