【发布时间】:2017-01-05 02:44:40
【问题描述】:
我想在 Xamarin.Forms 中为标签添加下划线文本。我找不到任何合适的解决方案。有一件事我发现 Xamarin 中的 a 中的文本没有下划线属性,因此我们可以为该行添加一个 BoxView,如下所示:
<StackLayout Grid.Row="0" Padding="0" VerticalOptions="Center">
<Label Text="Terms and Conditions" />
<BoxView BackgroundColor="White" HeightRequest="1" Margin="0,-8,0,0" />
</StackLayout>
但这也不是一个合适的解决方案,因为它会画线到整个StackView。我想只在上面代码中的“条款”等部分文本下划线。
【问题讨论】:
标签: xamarin label xamarin.forms underline