public static ParagraphsType CreateParagraphs(string value, StyleType style) { var paragraphs = new ParagraphsType(); var pgr = new Paragraph(); var txtRuns = new TextRunsType(); var v = new LocIDStringWithDataTypeAttribute {Value = value}; txtRuns.TextRun = new[] { new TextRun{Value = v, Style=style}.Create() }; pgr.TextRuns = txtRuns; if (style != null) { pgr.Style = style; } paragraphs.Paragraph = new[] { pgr.Create() }; return paragraphs; }
public static ParagraphsType CreateParagraphs(string value, StyleType style) { ParagraphsType paragraphs = new ParagraphsType(); Paragraph pgr = new Paragraph(); TextRunsType txtRuns = new TextRunsType(); LocIDStringWithDataTypeAttribute v = new LocIDStringWithDataTypeAttribute(); v.Value = value; txtRuns.TextRun = new TextRunType[] { new TextRun() { Value = v, Style=style }.Create() }; pgr.TextRuns = txtRuns; if (style != null) { pgr.Style = style; } paragraphs.Paragraph = new ParagraphType[] { pgr.Create() }; return paragraphs; }