WP7 Silverlight:如何使文本块中的链接可点击? [英] WP7 Silverlight: How to make the links in a textblock clickable?
问题描述
我知道以前有人问过这个问题,但其他答案对我不起作用,因为我使用的是 Windows Phone 7.
I know this question has been asked before, but the other answers don't work for me because I'm on Windows Phone 7.
我有一个 TextBlock
,它的 Text
直到运行时才知道.我需要使所有链接都可点击.我的方法基本上是此处所描述的方法,但没有WP7 SDK 中的 Hyperlink
类,我无法将 HyperlinkButton
添加到 textBlock.Inlines
.是我做错了什么,还是我需要不同的方法?
I have a TextBlock
whose Text
is not known until runtime. I need to make all links clickable. My approach is basically the one described here, but there is no Hyperlink
class in the WP7 SDK and I can't add a HyperlinkButton
to textBlock.Inlines
. Am I doing something wrong, or do I need a different approach?
推荐答案
WrapPanel with TextBlocks 和 HyperlinkButtons 已成为手机平台上解决此问题的一种模式.
WrapPanel with TextBlocks and HyperlinkButtons has been a pattern used for this problem on the phone platform.
这篇关于WP7 Silverlight:如何使文本块中的链接可点击?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!