/// <summary> /// Adds a new paragrah with a header and text with a give style for the header and the paragraph. /// </summary> /// <param name="headerText">The header of the paragrah</param> /// <param name="text">The text of the paragraph</param> /// <param name="paragraphStyle">The style of the paragraph</param> /// <param name="headerStyle">The style of the header</param> /// <param name="id">The id (name) of the paragraph</param> public NamedParagraph AddNamedParagraph(string text, string headerText, string paragraphStyle, string headerStyle, string id) { //Get the new index var index = GetNewIndex(); //Now add the paragraph var paragraph = new NamedParagraph(text, headerText, paragraphStyle, headerStyle, id); Paragraphs.Add(index, paragraph); return(paragraph); }
/// <summary> /// Adds a new paragrah, with an id, to the document on a given heading level. /// </summary> /// <param name="text">The text of the paragraph</param> /// <param name="headingLevel">The level of the paragraph</param> /// <param name="id">The id (name) of the paragraph</param> /// <returns>The paragraph without the header</returns> public NamedParagraph AddNamedParagraph(string text, int headingLevel, string id) { //Get the new index var index = GetNewIndex(); //Now add the paragraph var paragraph = new NamedParagraph(text, headingLevel, id); Paragraphs.Add(index, paragraph); return(paragraph); }