c# - 如何处理在 RichTextBox 中单击超链接的事件

标签 c# silverlight windows-phone-7 silverlight-4.0

如何处理 Windows Phone 中 RichTextBox 元素中超链接的点击事件。这是我的 RichTextBox 元素代码:

        <RichTextBox>
           <Paragraph>
Download it directly to the <Hyperlink Foreground="Blue" TargetName="_blank" NavigateUri="http://itunes.apple.com/fi/app/goalapp/id502461189?ls=1&amp;mt=8">iTunes Store</Hyperlink> or <Hyperlink Foreground="Blue" TargetName="_blank" NavigateUri="https://market.android.com/details?id=com.strikersoft.meramal.se">Android Market</Hyperlink>. The application is launched for Swedish app store.
     </Paragraph>
    </RichTextBox>

最佳答案

RichTextBox 控件有 LinkClicked 事件。它处理其文本中的所有 url 点击。

关于c# - 如何处理在 RichTextBox 中单击超链接的事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10535812/

相关文章:

c# - 泛型类型转换

设置某些值后,C#/WPF 位图保持白色(使用 LockBits)

javascript - Json.Net 中 JSON 中引用属性顺序的问题

silverlight - TextBlock.TextWrapping - 如何使文本换行以使线条居中对齐?

c# - 在C#中将各种日期格式转换为MM/dd/yyyy

c# - 多项选择题的所有可能排列

silverlight - 如何使用 SilverLight 播放 H264 流?

.net - 为要连接的 Windows Phone 7 应用程序构建服务的最佳可扩展架构是什么?

windows-phone-7 - 你能在wp7中以编程方式锁定屏幕吗

Silverlight WCF 与 BasicHttpBinding 配合使用,使用 CustomBinding/BinaryMessageEncoding 时出现 "HTTP 415 Unsupported Media Type"异常