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

Links Ignored in RadRichTextPageView

3 Answers 88 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Kelly
Top achievements
Rank 1
Kelly asked on 05 Jul 2012, 06:11 PM
Hello:

I am using a RadRichTextPageView inside a RadBook with code based on your demo here. I use an RtfFormatProvider to load an RTF file compiled in as a resource. This RTF file contains a Table of Contents. The TOC entries show up as hyperlinks in the RadRichTextPageView , and if I hover over them with the mouse, the cursor eventually changes to a Hand and a message saying "Ctrl-Click to follow Link" appears. However, Ctrl-click does nothing.

I have other embedded links (urls to external websites) in the same document that DO work, until I install the application OOB.

I need all of the links to work all of the time - OOB or not. Any suggestions?

Thank you,

KO

3 Answers, 1 is accepted

Sort by
0
Boby
Telerik team
answered on 10 Jul 2012, 11:50 AM
Hi Kelly,
The issue with hyperlinks not working in OOB mode is known and is in our to-do list, but it's not scheduled from implementation yet. You can, however, easily work around it using the public API and some of the methods in this stackoverflow article, for example:
public partial class MainPage : UserControl
{
    public class MyHyperlinkButton : HyperlinkButton
    {
        public void ClickMe()
        {
            base.OnClick();
        }
    
 
    public MainPage()
    {
        InitializeComponent();
 
        this.radRichTextBox.HyperlinkClicked += (sender, e) =>
        {
            if (App.Current.IsRunningOutOfBrowser)
            {
                MyHyperlinkButton button = new MyHyperlinkButton();
                button.NavigateUri = new Uri(e.URL, UriKind.Absolute);
                button.TargetName = "_blank";
                button.ClickMe();
            }
        };
    }
}


Kind regards,
Boby
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Kelly
Top achievements
Rank 1
answered on 10 Jul 2012, 04:51 PM
Boby,

I will try using the HyperlinkClicked event to change the PageIndex of the RadRichBoxPageView. Is that what you are thinkiing?

But can you please tell me how to get a reference to the RadRichTextBox so I can trap the HyperlinkClicked event? I'm using a RadRichTextPageView in a DataTemplate that is applied to the RadBook's LeftPageTemplate and RightPageTemplate.  There must be a RadRichTextBox buried in there somewhere...

Thank you,

Kelly
0
Kelly
Top achievements
Rank 1
answered on 10 Jul 2012, 06:14 PM
Thank you, but please disregard the above questions.  We decided not to use the RadRichTextPageView.

Kelly
Tags
RichTextBox
Asked by
Kelly
Top achievements
Rank 1
Answers by
Boby
Telerik team
Kelly
Top achievements
Rank 1
Share this question
or