For example,
I found this:
doc.evget.com/HelpDocument/SpireDocforSilverlighDocumentationCHM/html/69617cc9-6eb8-5149-cdf6-3e508e147917.htm
it says that when we set LineSpacingRule to Multiple, The line spacing is specified in the LineSpacing property as the number of lines. One line equals 12 points. So I make a test:
- Code: Select all
ParagraphStyle stylecontextred = new ParagraphStyle(document);
stylecontextred.Name = "contextred";
stylecontextred.CharacterFormat.FontSize = 12;
stylecontextred.CharacterFormat.TextColor = Color.Red;
stylecontextred.ParagraphFormat.LineSpacingRule = LineSpacingRule.Multiple;
stylecontextred.ParagraphFormat.LineSpacing = 2;
document.Styles.Add(stylecontextred);
The word is created, and I found the line space is NOT 2 line, but 0.17.
I don't know what's wrong, I miss understand the LineSpacingRule and LineSpacing property or something else.
I could not find an official explain or demo of this.
yours,
Ivan