【发布时间】:2020-02-12 12:38:34
【问题描述】:
有没有人想出如何使用LineBreakMode=WordWrap 将 Xamarin 表单标签中的文本居中(或证明或以任何方式水平效果)?不使用 WebView(或类似的)?
在这段代码 sn-p 中,所有HorizontalOptions 条目都被愉快地忽略了:
<StackLayout>
<Label
Margin="75,0,75,0"
FontAttributes="Italic"
FontSize="Large"
HorizontalOptions="Center"
LineBreakMode="WordWrap"
Text="Live life as though nobody is watching, and express yourself as though everyone Is listening."
VerticalOptions="CenterAndExpand" />
</StackLayout>
看起来像this。
【问题讨论】:
-
尝试使用
HorizontalTextAlignment
标签: xamarin.forms