Page layout options in our UWP viewer
Nutrient UWP SDK offers a rich GUI environment. This provides a great end user experience, but sometimes developers need programmatic control of these moving parts.
Changing the layout mode
Different documents and devices require the layout of a page to appear differently onscreen. It’s possible to control this layout mode programmatically rather than letting the user decide.
This example shows how to set the layout mode to double width:
await pdfView.Controller.SetLayoutModeAsync(LayoutMode.Double);
Keeping the first spread as a single page
In double-page spread layout mode, the title page or first page will appear next to the second page. Aesthetically, this may not be as pleasing to the eye as a standalone title page. This is often true for magazines that want to show a cover page before the regular content starts.
To set the first page to show as a single page, you can write the following:
await pdfView.Controller.SetKeepFirstSpreadAsSinglePageAsync(true);