2
这里是我的代码:如何用文字添加超链接的文本框中
<TextBlock TextWrapping="Wrap" TextAlignment="Left">
<TextBox IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap">
Please enter your details for login: questions follow the link
</TextBox>
<Hyperlink NavigateUri="https:" RequestNavigate="Hyperlink_RequestNavigate">
Reset Password
</Hyperlink>
</TextBlock>
文本框不会让我设置文本超链接。我需要将超链接保留在文本框之外,这会创建一个新行。但我希望超链接串联到文本。
我在TextBlock中使用TextBox的原因是为了使文本可选。
因为上面堆叠面板水平地对准元件它不会达到要求。我有窗口大小问题,所以文本和超链接应该进入新行。 – user1118468
@ user1118468然后设置StackPanel Orientation =“Vertical” – Kcvin