开发者

xaml: how to make visual studio to NOT process Carriage Return as space

A carriage return-line feed is processed as space if it appears before an inline element. for ex, when writing in design mode:

<Run>abc</Run>
<Run>def</Run>

when the application runs, it will appear as:

abc def

and not as:

abcdef

Is ther开发者_运维知识库e away to make visual studio to ignore the carriage return, so I will get the second example?


Well I guess you could try:

<Run>abc</Run><!--
--><Run>def</Run>

Kind of ugly though...


No, this goes deeper.

XAML is XML and there is a "any sequence of whitespace becomes 1 space" rule there. Same as in HTML.


I think, it's impossible. But you could write both Runs in single line:

<Run>abc</Run><Run>edf</Run>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜