开发者

WPF : spacing between two <span> without space character

i'm build some contents into flowdocument in programming way, not xaml.

i need a way to spacing between two spans, no use space character trick like following code:

Run spanTitle = new Run(paraTitle);
myTitle.Inlines.Add(spanTitle);

//" " + paraSubtitle to spacing spanTitle and spanSubTitle.
Run sp开发者_如何学CanSubTitle = new Run(" " + paraSubtitle);
myTitle.Inlines.Add(spanSubTitle);

i can't found any property in Span class, like a Margin, Padding, etc.

how can i control a space of two spans in programming way?


The proper spacing between two Runs in a Span IS a space because it will fit the font.

If you want a Margin or Padding, the two Runs should not be in the same Span.


You need to use a block element to have padding or margin.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜