Toggle visibility of the scroll bar in WPF Pdf Viewer

9 Jul 20261 minute to read

PDF Viewer supports showing and hiding a scrollbar, when you want to use the PDF Viewer only with touch support, you can hide the default scrollbars of the PDF Viewer using the ShowScrollbar. The following code example hides the scrollbar in the PDF Viewer control.

//Initialize PDF Viewer.
PdfViewerControl pdfViewer1 = new PdfViewerControl();
//Load the PDF.
pdfViewer1.Load("Sample.pdf");

// Hiding the scrollbar of the PDF Viewer
pdfViewer1.ShowScrollbar = false;
'Initialize PDF Viewer.
Private pdfViewer1 As New PdfViewerControl()
'Load the PDF.
pdfViewer1.Load("Sample.pdf")

' Hiding the scrollbar of the PDF Viewer
pdfViewer1.ShowScrollbar = False