新行、默认字体和大小(打开 xml sdk)
我需要的是在文本末尾插入新行。
我尝试使用 run.Append(**new Break()**);
但这模拟按下(Shift+Enter)键,如果我想要一个合理的文本,最新的行会自动调整,单词与单词之间有很多空格......
我遇到的另一个问题是这个 中的默认字体和大小“中断”/“换行”。 我尝试在这次运行中“附加”段落属性(其中包含中断)......但似乎这是不允许的。
What I need is to insert a new line at the end of a text.
I try with run.Append(**new Break()**);
but this simulates to pressing (Shift+Enter) keys, and if I want a justified text the latest line autofits with lot of spaces between word and word...
And another problem I have is the default font and size in this "Breaks"/"New Lines".
I try to "Appen" paragraph propierties in this run (wich contains the break)... but seems that is not allowed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试使用
CarriageReturn
代替。http://msdn.microsoft.com/en-us /library/documentformat.openxml.wordprocessing.carriagereturn.aspx
Try using
CarriageReturn
instead.http://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing.carriagereturn.aspx