【发布时间】:2019-03-26 21:05:10
【问题描述】:
如何在 Xamarin 表单中的格式化文本标签中保留空白我试过了,但它似乎不起作用
<Label FontSize="Medium">
<Label.FormattedText>
<FormattedString>
<Span xml:space="preserve">On PO: </Span>
<Span xml:space="preserve"> </Span>
<Span FontAttributes="Bold" FontSize="Large" Text="{Binding Qty}"/>
</FormattedString>
</Label.FormattedText>
</Label>
我收到此错误
Error Position 22:35. No property, bindable property, or event found for 'space', or mismatching type between value and property.
【问题讨论】:
-
你想渲染一个空白区域吗?
-
是的,您可以看到标签有 3 个跨度,当前跨度之间没有空格
标签: c# xaml xamarin.forms