I have a wpf RichTextBox . I want to insert a hyperlink in the richtextbox.I want that hyperlink to trigger only on a click. ( NOT ON CLICK WITH CONTROL KEY HOLDING )
I also tried with mouseleftbuttondown event, But it didnot work. I got error message like - mouseleftbuttondown event handler cannot take Uri.
I also tried with mouseleftbuttondown event, But it didnot work. I got error message like - mouseleftbuttondown event handler cannot take Uri.
<
RichTextBox
Margin
=
"22,38,108,124"
Name
=
"richTextBox1"
IsDocumentEnabled
=
"True"
>
<
FlowDocument
>
<
Paragraph
>
<
Bold
>Hi</
Bold
> Welcome to Semanticspace
<
Hyperlink
NavigateUri
=
"http://www.semanticspace.com"
RequestNavigate
=
"Hyperlink_RequestNavigate"
>Semanticspace
</
Hyperlink
>
</
Paragraph
>
</
FlowDocument
>
</
RichTextBox
>
private
void
Hyperlink_RequestNavigate(
object
sender, RequestNavigateEventArgs e)
{
System.Diagnostics.Process.Start(
"IExplore.exe"
, e.Uri.ToString());
}