Annotations list

In this document
chevron_rightIn Xamarin.Android
chevron_rightIn Xamarin.iOS

In 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();
};

In 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.AnnotationViewControllerSwitchToOutline += (object sender, EventArgs e) => {
    // switching to outline list
};
annotationViewController.AnnotationViewControllerSwitchToBookmarks += (object sender, EventArgs e) => {
    // switching to user bookmarks list
};
annotationViewController.AnnotationViewControllerDidCancel += (object sender, EventArgs e) => {
    this.DismissViewController (true, null);
};
annotationViewController.AlsoOutline = true;
annotationViewController.AlsoBookmarks = true;

navBrowseBookmarks = new UINavigationController (annotationViewController);

if (holderViewController == null) {
    holderViewController = new UIViewController ();
}
holderViewController.View.AddSubview (navBrowseBookmarks.View);

if (this.PresentedViewController == null) {
    this.PresentViewController (holderViewController, true, null);
}