Some test text!
Xamarin / Guides
The list container is a UI component that contains other components related to annotations and bookmarks.
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.
The navigation lists control is part of the Tools library, so make sure you have added the Tools library to your project .
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);
PTNavigationListsViewController
's
PopoverPresentationController
with either:
SourceRect
AND SourceView
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;
Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales