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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

FreeTextAnnotation Canceled Working differently

Thread ID:





142476 Feb 5,2019 07:45 PM UTC Feb 7,2019 01:16 PM UTC Xamarin.Forms 4
Tags: PdfViewer
Zach Carls
Asked On February 5, 2019 07:45 PM UTC

I have a custom toolbar. When the Free Text button is clicked, the annotation mode gets set to AnnotationMode.FreeText. When you tap on the screen, a prompt opens with a keyboard, allowing the user to type something, press cancel(X) in the top left or done(a checkmark) in the top right. Currently, I'm experiencing different functionalities on iOS and Android. In iOS, when the cancel button is clicked, the prompt disappears and the annotation mode gets set back to none and I can continue scrolling the pdf. In Android, when the cancel button is clicked, the prompt disappears but the button remains in the free text mode and I cannot scroll. When I try to scroll, another prompt is brought up because it gets registered as a tap event. 

Is there any way to intercept the cancel button? I toggle my Free Text button with two images, one in the normal, unselected state and another filled-in button signifying that the button is selected. When the cancel button is pressed, I want to deselect the Free Text button and cancel the free text annotation mode in both platforms.

Zach Carls
Replied On February 5, 2019 08:06 PM UTC

Note: I've tried using FreeTextPopupDisappeared but it isn't being called.

Karthik Krishnaraj [Syncfusion]
Replied On February 6, 2019 12:46 PM UTC

Hi Kristen, 
On checking the behavior in Adobe reader mobile, we could see that the free text annotation text box is displayed again even if click the cancel button and then tap on PDF document. Free text annotation text box will be disappeared completely only when we deselect the free text annotation. So, we will consider this as behavior and implement the same in Xamarin.Forms(iOS and UWP) any of our upcoming release. 
However, to avoid popping up the free text popup on tapping the PDF document even if click the cancel button, we suggest you set the AnnotationMode property to none in FreeTextPopupDisappeared event which is raised when free text popup disappeared by clicking Ok or Cancel button in your custom toolbar sample. 
Please find the code snippet below for your reference. 
pdfViewerControl.FreeTextPopupDisappeared += PdfViewerControl_FreeTextPopupDisappeared; 
private void PdfViewerControl_FreeTextPopupDisappeared(object sender, FreeTextPopupDisappearedEventArgs args) 
pdfViewerControl.AnnotationMode = AnnotationMode.None; 

Zach Carls
Replied On February 6, 2019 02:39 PM UTC

I have a breakpoint set in my FreeTextPopupDisappeared event and it isn't being called in iOS, only in Android. 

Karthik Krishnaraj [Syncfusion]
Replied On February 7, 2019 01:16 PM UTC

Hi Kristen, 
We were able to reproduce the issue with “FreeText annotation popup disappeared event haven’t triggered” in Xamarin.Forms.iOS is a defect from our side. The fix for the reported issue will be included in our Essential Studio 2019 Volume 1 release which will be rolled out in the month of March 2019. 


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

Live Chat Icon For mobile
Live Chat Icon