How to cancel or handle a hyperlink event in PdfViewer?

Hello,

I wanted to know how to supress the outgoing link action if using custom hyperlink handling in Syncfusion.Windows.PdfViewer.HyperlinkEventArgs?
Like if you set e.Handled = true with buttons etc.

Example usage:
private void PdfViewer_HyperlinkPointerPressed(object sender, Syncfusion.Windows.PdfViewer.HyperlinkEventArgs e)
        {            
            if (e.URI.Contains("somethingFancy"))
            {
                // make custom action and DONT try to link out
            }
        }

The above works, and the custom action is working but - it shows the "select an app from the store" popup from windows because it's trying to link out.
I searched for a e.Handled which we could set to "true" but found none.

Are there other ways to block/handle the event manually?

EDIT: 
The API reference says, there's a "Handled" member: https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.HyperlinkEventArgs.html#Syncfusion_Windows_PdfViewer_HyperlinkEventArgs_Handled
But I can't access it and VS2017 tells me there's no such symbol to resolve. I've the newest libraries to date (10.0.20182.595)

Best regards,
Andreas

3 Replies

LN Lakshmi Narayanan Asokan Syncfusion Team September 13, 2018 06:52 AM UTC

Hi Andreas, 
 
Thank you for contacting Syncfusion support. 
 
We exposed “Handled” APIs in version 16.2.0.41 which released in the end of June 2018. We suggest you upgrade to latest version to use “Handled” APIs. Please download the latest one from below link, 
 
 
Best, 
Lakshmi Narayanan Asokan 



AF Andreas Fischer September 13, 2018 07:52 PM UTC

Hello Lakshmi,

you're absolutley right. The version number I wrote was a completley wrong one - I mixed it up with another framework ;)
In fact my SF libraries were outdatet, downloaded the new ones and it is working as suggested.

Thank you,
Andreas


LN Lakshmi Narayanan Asokan Syncfusion Team September 14, 2018 09:54 AM UTC

Hi Andreas, 
 
Thank you for your update. 
 
We are glad to know that your issue is resolved. 
 
Best, 
Lakshmi Narayanan Asokan 


Loader.
Up arrow icon