I am attempting to cancel the search and open my own window. The custom code passes, but then an exception is thrown in the pdf viewer.
I capture the search initiation
pdfViewerControl.SearchInitiated += PdfViewerControl_SearchInitiated;
Then call this
private void PdfViewerControl_SearchInitiated(object sender, Syncfusion.SfPdfViewer.XForms.TextSearchInitiatedEventArgs args)
{
pdfViewerControl.CancelSearch();
Navigation.PushModalAsync(new SearchPage());
}
The break point will go past the above, then I see this:
0xC6 in Syncfusion.SfPdfViewer.XForms.Droid.TextSearchHandler.SearchText C#
0x29 in Syncfusion.SfPdfViewer.XForms.Droid.PdfDependencyServices.SearchText C#
0xD in Syncfusion.SfPdfViewer.XForms.SfPdfViewer.SearchText C#
0x5C in Syncfusion.SfPdfViewer.XForms.SearchToolbar.SearchEntry_Completed C#
0x39 in Xamarin.Forms.SearchBar.OnSearchButtonPressed at D:\a\1\s\Xamarin.Forms.Core\SearchBar.cs:129,4 C#
0x6 in Xamarin.Forms.Platform.Android.SearchBarRenderer.Android.Widget.SearchView.IOnQueryTextListener.OnQueryTextSubmit at D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\SearchBarRenderer.cs:48,4 C#
0x11 in Android.Widget.SearchView.IOnQueryTextListenerInvoker.n_OnQueryTextSubmit_Ljava_lang_String_ at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-31/mcw/Android.Widget.SearchView.cs:261,5 C#
0x9 in Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_Z at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:132,5 C#