We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CancelTextSearchCommand not working

Thread ID:





132229 Aug 21,2017 11:24 PM UTC Aug 23,2017 05:36 AM UTC Xamarin.Forms 3
Tags: PdfViewer
Simon Haile
Asked On August 21, 2017 11:24 PM UTC

I'm having difficulty using the CancelTextSearchCommand in the SfPdfViewer control. I'm currently using the code provided in https://help.syncfusion.com/xamarin/sfpdfviewer/search-for-text-instance#how-to-cancel-text-search I only change the image name. The button shows up (as does the search button). However it doesn't un-highlight the text when pressed. Here is a copy of my implementation. 

In xaml
<Button x:Name="cancelSearchButton" Grid.Column="3" BackgroundColor="Black" Image="infoicon.png" HorizontalOptions="Start" VerticalOptions="Center" Command="{Binding CancelTextSearchCommand, Source={x:Reference Name=pdfViewerControl}}"/> 

In View Model (binding context)
public LinkedCommand CancelTextSearchCommand { get { return _cancelTextSearchCommand ?? (_cancelTextSearchCommand = new LinkedCommand(Mediator, (e) => 

ExecuteCancelTextSearchCommand(e))); } } 

public void ExecuteCancelTextSearchCommand(object param) { }

Thoughts and comments very welcome!

Balasubramanian Sundararajan [Syncfusion]
Replied On August 22, 2017 11:46 AM UTC

Hi Simon, 

Sorry for the inconvenience caused. 

In order to cancel the text search operation you need to use `CancelSearchTextCommand` which is available in our PDF viewer control. Command name provided in the cancel search operation is incorrect in our Xamarin UG documentation. We have updated our Xamarin.Forms UG documentation with the correct content and you can refer the following link for more details, 

Also, we have created a sample for your reference which contains our PDF viewer control and the sample can be downloaded from the following link, 

Please try the above solution and let us know whether the reported issue gets resolve in your end or not. 

Balasubramanian S 

Simon Haile
Replied On August 22, 2017 05:27 PM UTC

Hi Balasubramanian,

Thanks for the prompt assistance with this. 'CancelSearchTextCommand' did resolve the issue on my end.



Balasubramanian Sundararajan [Syncfusion]
Replied On August 23, 2017 05:36 AM UTC

Hi Simon, 
Thank you for your update. 
We are glad to know that your issue is resolved. 
Balasubramanian S 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon