Some test text!

Discord Logo

Chat with us

PDFTron is now Apryse, learn more here.

Xamarin / Guides



PDFTron is now Apryse, learn more here.

List Container

The list container is a UI component that contains other components related to annotations and bookmarks.

List container to customize horizontal menu layout in Xamarin.iOS

This tutorial only applies to Xamarin.iOS. See Xamarin.Android equivalent here .

The PTNavigationListsViewController class is a container view controller that shows the annotation list , document outline , and user-defined bookmark list controls with a UITabBarController-like interface. A segmented control is used to select which child view controller to display.

Navigation lists view controller

The navigation lists control is part of the Tools library, so make sure you have added the Tools library to your project .

Show a navigation lists view controller

To create a new navigation lists view controller and display it from another view controller, set the child list view controllers to the PTNavigationListsViewController class's ListViewControllers property:

var navigationListsViewController = new PTNavigationListsViewController(mToolManager);

var annotationViewController = new PTAnnotationViewController(mPdfViewCtrl);
annotationViewController.AnnotationViewControllerAnnotationSelected += (object sender, AnnotationViewControllerAnnotationSelectedEventArgs e) => {
    // perform custom action
annotationViewController.AnnotationViewControllerDidCancel += (object sender, EventArgs e) => {
    // perform custom action

var outlineViewController = new PTOutlineViewController (mPdfViewCtrl);
outlineViewController.OutlineViewControllerOutlineSelected += (sender, e) => {
    // perform custom action
outlineViewController.OutlineViewControllerDidCancel += (object sender, EventArgs e) => {
    // perform custom action

var bookmarkViewController = new PTBookmarkViewController (mPdfViewCtrl);
bookmarkViewController.BookmarkViewControllerBookmarkSelected += (sender, e) => {
    // perform custom action
bookmarkViewController.BookmarkViewControllerDidCancel += (object sender, EventArgs e) => {
    // perform custom action

navigationListsViewController.ListViewControllers = new UIViewController[] {
    outlineViewController, annotationViewController, bookmarkViewController
if (UserInterfaceIdiomIsPhone)
  navigationListsViewController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
} else{
  navigationListsViewController.ModalPresentationStyle = UIModalPresentationStyle.Popover;
  navigationListsViewController.PopoverPresentationController.BarButtonItem = navigationListsButton;
this.PresentViewController(navigationListsViewController, true, null);
Presenting on iPads:
The navigation list view controller is designed to be presented in a popover on iPads. To do so, you must provide the PTNavigationListsViewController's PopoverPresentationController with either: OR as in the example above.


The PTNavigationListViewController provides a flexible API for displaying only the desired child view controllers. Any of the annotation list, document outline, or user-defined bookmark list view controllers can be removed by omitting them from the listViewControllers property. It is also possible to add a custom child view controller by adding it to the listViewControllers array.

To specify which of the child view controllers to display on opening the navigation list control, either the SelectedIndex , or the SelectedViewController property can be used.

// Show the navigationListsViewController's annotationViewController on opening
navigationListsViewController.SelectedViewController = navigationListsViewController.annotationViewController;
// OR specify an index to show from the `listViewControllers` property
navigationListsViewController.SelectedIndex = 0;

Get the answers you need: Support