WP7 Silverlight: How to make the links in a textblock clickable?

一世执手 提交于 2019-12-24 09:49:23

问题


I know this question has been asked before, but the other answers don't work for me because I'm on Windows Phone 7.

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?


回答1:


WrapPanel with TextBlocks and HyperlinkButtons has been a pattern used for this problem on the phone platform.



来源:https://stackoverflow.com/questions/4544761/wp7-silverlight-how-to-make-the-links-in-a-textblock-clickable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!