gpt4 book ai didi

c# - 如何在文本属性中放置不同的文本格式和超链接

转载 作者:行者123 更新时间:2023-11-30 17:26:25 27 4
gpt4 key购买 nike

我想在我的 xamarin.forms 项目中使用一个 syncfusion 复选框,文本属性应该在单个单词 block 上包含一个超链接,应该像这样加下划线:

[ ] 继续注册帐户即表示您同意“条款和条件”

单词 block “条款和条件”应使用超链接加下划线。

复选框的 XAML 如下所示:

<SfCheckBox x:Name="checkBoxIsAgreed" Text="text here"/>

如何仅使用一个字符串文本属性来实现这一点?

提前致谢!

最佳答案

更好的是,您可以像下面这样将文本和复选框分开。

    <StackLayout Orientation="Vertical">
<SfCheckBox Text="text here"/>
<Label>
<Label.FormattedText>
<FormattedString>
<Span Text="Text Here" />
<Span Text="Terms and Conditions" TextDecorations="Underline">
<Span.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</Span.GestureRecognizers>
</Span>
</FormattedString>
</Label.FormattedText>
</Label>
</StackLayout>

关于c# - 如何在文本属性中放置不同的文本格式和超链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56627166/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com