Some test text!

Thumbnail sliderkeyboard_arrow_down

Thumbnail slider

In this document
chevron_rightIn Xamarin.Android
chevron_rightIn Xamarin.iOS

linkIn Xamarin.Android

Using thumbnail slider in Xamarin.Android is identical to using ThumbnailSlider in Android. See tutorial here.

For example, the equivalent of the example provided in the Android guide will be:

<pdftron.PDF.Controls.ThumbnailSlider
    android:id="@+id/thumbseekbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true" />

If ThumbnailSlider is in the same layout as PDFViewCtrl, then:

<pdftron.PDF.Controls.ThumbnailSlider
    android:id="@+id/thumbseekbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    app:pdfviewctrlId="@id/pdfviewctrl" />

If ThumbnailSlider is not in the same layout as PDFViewCtrl, then:

var thumbnailSlider = FindViewById<ThumbnailSlider>(Resource.Id.thumbseekbar);
thumbnailSlider.SetPdfViewCtrl(mPdfViewCtrl);

linkIn Xamarin.iOS

Using thumbnail slider in Xamarin.iOS is identical to using ThumbnailSliderViewController in iOS. See tutorial here.

For example, the equivalent of the example provided in the iOS guide will be:

thumbnailSliderViewController = new pdftron.PDF.Controls.ThumbnailSliderViewController(mPdfViewCtrl);
thumbnailSliderViewController.View.TranslatesAutoresizingMaskIntoConstraints = false;

AddChildViewController(thumbnailSliderViewController);
View.AddSubview(thumbnailSliderViewController.View);

NSLayoutConstraint.ActivateConstraints(new NSLayoutConstraint[] {
    thumbnailSliderViewController.View.LeadingAnchor.ConstraintEqualTo(this.View.LeadingAnchor),
    thumbnailSliderViewController.View.WidthAnchor.ConstraintEqualTo(this.View.WidthAnchor),
    thumbnailSliderViewController.View.BottomAnchor.ConstraintEqualTo(this.View.BottomAnchor)
});
thumbnailSliderViewController.DidMoveToParentViewController(this);

mPdfViewCtrl.PageNumberChangedFrom += (sender, e) =>
{
    thumbnailSliderViewController?.SetSliderValue(e.NewPageNumber);
};

Populate with thumbnail images:

mPdfViewCtrl.GotThumbAsync += (sender, e) =>
{
    if (e.Image == null)
    {
        return;
    }
    this.thumbnailSliderViewController?.SetThumbnail(e.Image, e.Page_num);
};