This is a migrated thread and some comments may be shown as answers.

WPF RICH TEXT BOX SUPPORTING HTML CONTENTS

0 Answers 63 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Asish
Top achievements
Rank 1
Asish asked on 01 Dec 2010, 05:58 AM
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.

<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());
        }

        {
            System.Diagnostics.Process.Start("IExplore.exe", e.Uri.ToString());
        }
private void Hyperlink_RequestNavigate(object sender, 

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Asish
Top achievements
Rank 1
Share this question
or