SfBusyIndicator inside PdfViewer toolbar search

Is it possible to show a busy indicator when searching for occurrences of a text in the PdfViewer? I'm using a custom toolbar but I'm having trouble getting the indicator to show. Here's the code for my search bar, which is just modified from syncfusion examples.
XAML:
<busyindicator:SfBusyIndicator x:Name="BusyIndicator" IsVisible="true" Title="Searching..." AnimationType="DoubleCircle" />

<Entry Grid.Column="1" x:Name="textSearchEntry" FontSize="18" HorizontalOptions="Fill" VerticalOptions="Center" Text="{Binding SearchedText}" TextColor="Black" Completed="OnEntryCompleted">
     <Entry.Behaviors>
          <behavior:EventToCommandBehavior EventName="Completed" Command="{Binding SearchNextTextCommand , Source={x:Reference Name=pdfViewerControl}}" CommandParameter="{Binding Source ={x:Reference Name=textSearchEntry}, Path=Text}" />
     </Entry.Behaviors>
</Entry>


XAML.CS
public void OnEntryCompleted(object sender, EventArgs e)
        {
            BusyIndicator.IsBusy = true;
        }


private void pdfViewerControl_SearchCompleted(object sender, TextSearchCompletedEventArgs args)
        {
            BusyIndicator.IsBusy = false;
            bool isNoMoreOccurrenceFound = args.NoMoreOccurrence;
            bool isNoMatchFound = args.NoMatchFound;
            if (isNoMatchFound)
            {
                DisplayAlert("No Match Found", "No instance of the text has been found.", "OK");
            }
        }


1 Reply

KK Karthik Krishnaraj Syncfusion Team October 24, 2018 07:28 AM UTC

Hi Kristen, 
 
As per your request we have prepared a sample to show busy indicator when searching for the occurrence of text in PDF Viewer. You can find the sample from below link. 
 
Sample Link: 
 
Please check with the provided sample and let us know if it helps. 
 
Regards, 
Karthik. 


Loader.
Up arrow icon