> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/xamarin/guides/viewer-components/thumbnails-view-i.md).

# Manipulate pages with thumbnail browser in Xamarin

Learn how to use the PTThumbnailsViewController class in Xamarin.iOS to view, navigate, and edit PDF pages. Add the Tools library to your project and follow step-by-step instructions for creating and

{% hint style="info" %}
**This tutorial only applies to Xamarin.iOS. See Xamarin.Android equivalent here .**
{% endhint %}

The [`PTThumbnailsViewController`](https://sdk.apryse.com/api/xamarinios/tools/api/pdftron.PDF.Controls.PTThumbnailsViewController.html) class allows users to view and navigate the pages of a [`PTPDFViewCtrl`](https://sdk.apryse.com/api/xamarinios/tools/api/pdftron.PDF.PDFViewCtrl.html) as well as re-arrange and remove pages.

![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-21fa8f7e1ba4dd11522bd4a8e88d7df36f1d9e4e%2F92522c0a1a539e45ee406bb261691501e9cdeef5-1242x2208.png?alt=media)

*The page thumbnails control is part of the Tools library, so make sure you have* [*added the Tools library to your project*](/xamarin/ui-customization/setup.md)*.*

## Show a page thumbnails view controller

To create a new page thumbnails view controller instance and display it from another view controller, supply a `PTPDFViewCtrl` instance to the `PTThumbnailsViewController` designated initializer:

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
var thumbnailsViewController = new pdftron.PDF.Controls.PTThumbnailsViewController(mPdfViewCtrl);
var navController = new UINavigationController(thumbnailsViewController);
this.PresentViewController(navController, true, null);
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
**The thumbnails view controller does not create its own top navigation bar, so it must be pushed onto a navigation controller's stack in order for the top navigation bar and 'Edit' button to be shown.**
{% endhint %}

## Populate the view controller with thumbnail images

The thumbnail images shown in the thumbnails view controller are generated by the `GetThumbAsync:` method of the `PTPDFViewCtrl` class. When ready, the thumbnail images are provided to the `pdfviewCtrl`'s delegate via the `GotThumbAsync:thumbImage:` method.

In your class adopting the `PTPDFViewCtrlDelegate` protocol (usually the same view controller presenting the thumbnails view controller), add the following:

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
mPdfViewCtrl.GotThumbAsync += (sender, e) =>
{
    if (e.Image == null)
    {
        return;
    }
    if (this.thumbnailsViewController != null && this.thumbnailsViewController.PresentingViewController != null)
    {
        this.thumbnailsViewController.SetThumbnail(e.Image, e.Page_num);
    }
};
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}

## Interact with the view controller

{% endhint %}

Pages can be re-arranged and removed in edit-mode, which is activated by the 'Edit' button in the navigation bar. Long-pressing and dragging allows the user to move a page to a different location in the same document, and tapping one or more documents selects them for removal with the trash can icon. The user is prompted for confirmation before any pages are permanently removed.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.apryse.com/xamarin/guides/viewer-components/thumbnails-view-i.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
