Some test text!

Annotations list

In this document
chevron_rightIn Xamarin.Android
chevron_rightIn Xamarin.iOS

linkIn Xamarin.Android

Using annotations list in Xamarin.Android is identical to using AnnotationDialogFragment in Android. See tutorial here.

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

var annotDialog = AnnotationDialogFragment.NewInstance().SetPdfViewCtrl(mPdfViewCtrl);
annotDialog.SetStyle((int)DialogFragmentStyle.NoTitle, Resource.Style.CustomAppTheme);
annotDialog.Show(this.SupportFragmentManager, "annotation_list_dialog");
annotDialog.AnnotationClicked += (sender, e) =>
{
    Console.WriteLine("AnnotationClicked on page: " + e.PageNum);
    annotDialog.Dismiss();
};
annotDialog.ExportAnnotations += (sender, e) =>
{
    Console.WriteLine("ExportAnnotations");
    annotDialog.Dismiss();
};

linkIn Xamarin.iOS

Using annotations list in Xamarin.iOS is identical to using AnnotationViewController in iOS. See tutorial here.

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

AnnotationViewController annotationViewController = new pdftron.PDF.Controls.AnnotationViewController (mPdfViewCtrl);
annotationViewController.AnnotationViewControllerAnnotaionSelected += (object sender, AnnotationViewControllerAnnotaionSelectedEventArgs e) => {
    // perform custom action
    this.DismissViewController (true, null);
};
annotationViewController.AnnotationViewControllerDidCancel += (object sender, EventArgs e) => {
    this.DismissViewController (true, null);
};

var navBrowseBookmarks = new UINavigationController (annotationViewController);
this.PresentViewController (navBrowseBookmarks, true, null);