从 Windows phone 7 中的 Webbrowser 控件中检索选定的文本 [英] Retrieving Selected Text from Webbrowser control in Windows phone 7

查看:25
本文介绍了从 Windows phone 7 中的 Webbrowser 控件中检索选定的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用 Tap 选择时,我正在尝试从 Windows phone 7 中的 Webbrowser 控件中检索所选文本.还想在选择文本时删除复制图标.

I am trying to Retrieve selected text from Webbrowser control in Windows phone 7 when it is selected using Tap. Also want to remove the Copy icon when you select the Text.

在按住时点击我想确认 webbrowser 控件有任何选定的文本.我怎么能把支票放在那里.

When on Hold Tapping I want to confirm that webbrowser control has any selected text. How could i place a check there.

我还想突出显示 Webbrowser Control 中的选定文本.

Also i want to Highlight the Selected Text in Webbrowser Control.

所以这里的问题是识别选定文本的开始和结束.

So problem here is to identify the start and stop of Selected text.

我感谢任何与此相关的帮助或资源.

I appreciate any help or resources regarding this.

谢谢

推荐答案

通过调用

function GetSelectedText() {
       window.external.Notify(document.selection.createRange().htmlText);           
    }

并添加

Browser.ScriptNotify += new EventHandler<NotifyEventArgs>(Browser_ScriptNotify);

......
void Browser_ScriptNotify(object sender, NotifyEventArgs e)
{
  if(e.Value != null)
     MessageBox.Show(e.Value);
}

帮我解决.感谢@Sergei Grebnov 为您提供指导.

Solve it for me. Thanx @Sergei Grebnov for you Guidance.

这篇关于从 Windows phone 7 中的 Webbrowser 控件中检索选定的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆