有没有办法在 TextBlock 块内放置一个 HyperlinkButton? (Windows 手机 7)
我有一大段文本,我想在其中“嵌入”一个超链接。像 this 这样的东西 - 类似于 html a 标签。
我假设有一种简单的方法可以使用 Windows Phone 7 中的 HyperlinkButton 来执行此操作 - Silverlight 只是没有找到它......
I have a big block of text and I want to have a hyperlink "embedded" inside it. Something like this - akin to an html a tag.
I'm assuming there's an easy way to do this with the HyperlinkButton in Windows Phone 7 and - Silverlight just didn't find it...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,并没有真正好的方法 - 典型的方法是使用 WrapPanel(在 Windows Phone Toolkit 的 SL 中),并用 TextBlock 和 HyperlinkButton 元素填充它。
Web 浏览器(在台式 PC/Mac 上)中的 Silverlight 4 具有 RichTextBox,它具有可以内联文本的超链接元素,因此如果您也在桌面上执行 SL 操作,那么这是一个更好的方法。
There's not really a good way that I know of - the typical way of doing this is to use a WrapPanel (in the SL for Windows Phone Toolkit), and fill it with TextBlock and HyperlinkButton elements.
Silverlight 4 in a web browser (on a desktop PC/Mac) has RichTextBox which has a Hyperlink element that can be inline with text, so if you're also doing SL stuff for the desktop, that's a much better way to do it there.