Some test text!

Search
Hamburger Icon

Xamarin / Guides / Scroll direction

Scroll direction in Xamarin viewer

When scrolling through pages of a document in PDFViewCtrl, the scrolling direction can be changed by setting the page layout mode .

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.AndroidXamarin.iOS
Vertical scrollingVertical scrolling
```java //@data {"m":true}// // with PdfViewCtrlTabHostFragment2 PdfViewCtrlSettingsManager.updateViewMode(activity, PdfViewCtrlSettingsManager.KEY_PREF_VIEWMODE_CONTINUOUS_VALUE); // with PDFViewCtrl pdfViewCtrl.setPagePresentationMode(PDFViewCtrl.PagePresentationMode.SINGLE_CONT); ``` ```kotlin //@data {"m":true}// // with PdfViewCtrlTabHostFragment2 PdfViewCtrlSettingsManager.updateViewMode(activity, PdfViewCtrlSettingsManager.KEY_PREF_VIEWMODE_CONTINUOUS_VALUE) // with PDFViewCtrl mPdfViewCtrl.pagePresentationMode = PDFViewCtrl.PagePresentationMode.SINGLE_CONT ```
// Xamarin.Android
// with PdfViewCtrlTabHostFragment2
PdfViewCtrlSettingsManager.UpdateViewMode(activity, PdfViewCtrlSettingsManager.KeyPrefViewmodeContinuousValue);
// with PDFViewCtrl
pdfViewCtrl.PagePresentationMode = PDFViewCtrl.PagePresentationMode.SingleCont;

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.AndroidXamarin.iOS
Horizontal scrollingHorizontal scrolling
// Xamarin.Android
// with PdfViewCtrlTabHostFragment2
PdfViewCtrlSettingsManager.UpdateViewMode(activity, PdfViewCtrlSettingsManager.KeyPrefViewmodeSinglepageValue);
// with PDFViewCtrl
pdfViewCtrl.PagePresentationMode = PDFViewCtrl.PagePresentationMode.Single;

Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales