开发者

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

开发者 https://www.devze.com 2023-02-06 17:40 出处:网络
A carriage return-line feed is processed as space if it appears before an inline element. for ex, when writing in design mode:

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

精彩评论

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