> 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/advanced-customization/scrolling-direction.md).

# Scroll direction in Xamarin viewer

Learn how to change scrolling direction in PDFViewCtrl for vertical and horizontal scrolling modes in Xamarin.Android and Xamarin.iOS. Optimize your document viewing experience now! The Apryse Xamarin

When scrolling through pages of a document in [`PDFViewCtrl`](https://sdk.apryse.com/api/xamarinandroid/pdfnet/api/pdftron.PDF.PDFViewCtrl.html), the scrolling direction can be changed by [setting the page layout mode](/xamarin/guides/android/viewer/view-mode.md#layout).

## Vertical scrolling

Vertical scrolling mode (also known as continuous mode) can be enabled by setting the page presentation mode to either `PDFViewCtrl.PagePresentationModes.SingleCont` / `pdftron.PDF.PagePresentationModes.e_single_continuous`, `PDFViewCtrl.PagePresentationModes.FacingCont` / `pdftron.PDF.PagePresentationModes.e_facing_continuous`, or `PDFViewCtrl.PagePresentationModes.FacingCoverCont` / `pdftron.PDF.PagePresentationModes.e_facing_continuous_cover`.

Here's what setting the page presentation mode to vertical scrolling looks like:

| Xamarin.Android                                                                                                                                                                                                                                 | Xamarin.iOS                                                                                                                                                                                                                                     |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-bb57a00c5e5b24f8cf8494dae5947a774fcaef8e%2F1f698d6dd0736191a127e5f361af1cf17f64f213-600x1200.gif?alt=media) | ![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-c549ed94ae782cc6eb640b07fa5103a541ae72a1%2F828c641771a8e938c72c082089f39e17cb3eb6b4-720x1280.gif?alt=media) |

{% tabs %}
{% tab title="Java" %}
{% code lineNumbers="true" %}

```java
// with PdfViewCtrlTabHostFragment2 
PdfViewCtrlSettingsManager.updateViewMode(
    activity, 
    PdfViewCtrlSettingsManager.KEY_PREF_VIEWMODE_CONTINUOUS_VALUE
); 

// with PDFViewCtrl 
pdfViewCtrl.setPagePresentationMode(
    PDFViewCtrl.PagePresentationMode.SINGLE_CONT
);
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code lineNumbers="true" %}

```kotlin
// with PdfViewCtrlTabHostFragment2 
PdfViewCtrlSettingsManager.updateViewMode(
    activity, 
    PdfViewCtrlSettingsManager.KEY_PREF_VIEWMODE_CONTINUOUS_VALUE
) 

// with PDFViewCtrl 
mPdfViewCtrl.pagePresentationMode = PDFViewCtrl.PagePresentationMode.SINGLE_CONT
```

{% endcode %}
{% endtab %}

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

```csharp
// Xamarin.Android
// with PdfViewCtrlTabHostFragment2
PdfViewCtrlSettingsManager.UpdateViewMode(activity, PdfViewCtrlSettingsManager.KeyPrefViewmodeContinuousValue);
// with PDFViewCtrl
pdfViewCtrl.PagePresentationMode = PDFViewCtrl.PagePresentationMode.SingleCont;
```

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

## Horizontal scrolling

Horizontal scrolling mode (also known as non-continuous mode) can be enabled by setting the page presentation mode to either `PDFViewCtrl.PagePresentationModes.Single` / `pdftron.PDF.PagePresentationModes.e_single_page`, `PDFViewCtrl.PagePresentationModes.Facing` / `pdftron.PDF.PagePresentationModes.e_facing`, or `PDFViewCtrl.PagePresentationModes.FacingCover` / `pdftron.PDF.PagePresentationModes.e_facing_cover`.

Here's what setting the page presentation mode to horizontal scrolling looks like:

| Xamarin.Android                                                                                                                                                                                                                                 | Xamarin.iOS                                                                                                                                                                                                                                     |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-8340082568d8ca69e6727347377b099f34e9e0a9%2F811227718b1a22af1fbdc27ae9f4ff5f9d33b11f-600x1200.gif?alt=media) | ![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-091bdae1081d0c00a1e28d8e329dae944225243f%2Fb635b13da3ad2732b9043733d3b39bf7be7eda57-720x1280.gif?alt=media) |

{% tabs %}
{% tab title="Java" %}
{% code lineNumbers="true" %}

```java
// with PdfViewCtrlTabHostFragment2
PdfViewCtrlSettingsManager.updateViewMode(activity, PdfViewCtrlSettingsManager.KEY_PREF_VIEWMODE_CONTINUOUS_VALUE);

// with PDFViewCtrl
pdfViewCtrl.setPagePresentationMode(PDFViewCtrl.PagePresentationMode.SINGLE_CONT);
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code lineNumbers="true" %}

```kotlin
// with PdfViewCtrlTabHostFragment2
PdfViewCtrlSettingsManager.updateViewMode(activity, PdfViewCtrlSettingsManager.KEY_PREF_VIEWMODE_SINGLEPAGE_VALUE)

// with PDFViewCtrl
mPdfViewCtrl.pagePresentationMode = PDFViewCtrl.PagePresentationMode.SINGLE
```

{% endcode %}
{% endtab %}

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

```csharp
// Xamarin.Android
// with PdfViewCtrlTabHostFragment2
PdfViewCtrlSettingsManager.UpdateViewMode(activity, PdfViewCtrlSettingsManager.KeyPrefViewmodeSinglepageValue);
// with PDFViewCtrl
pdfViewCtrl.PagePresentationMode = PDFViewCtrl.PagePresentationMode.Single;
```

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


---

# 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/advanced-customization/scrolling-direction.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.
