Reputation: 369
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.
When on Hold Tapping I want to confirm that webbrowser control has any selected text. How could i place a check there.
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.
Thanks
Upvotes: 2
Views: 963
Reputation: 369
By Calling
function GetSelectedText() {
window.external.Notify(document.selection.createRange().htmlText);
}
and Adding
Browser.ScriptNotify += new EventHandler<NotifyEventArgs>(Browser_ScriptNotify);
......
void Browser_ScriptNotify(object sender, NotifyEventArgs e)
{
if(e.Value != null)
MessageBox.Show(e.Value);
}
Solve it for me. Thanx @Sergei Grebnov for you Guidance.
Upvotes: 1