How to hide Outline pane in the PdfViewer?

Hello,


I can't figure out how to hide the outline pane or whatever the name of this part is:

Image_3369_1715951268365

I've already tried something like 


   var outlinePane = pdfViewer.Template.FindName("PART_OutlinePane", pdfViewer) as UIElement;
   if ( null != outlinePane )
   {
       outlinePane.Visibility = Visibility.Collapsed;
   }


   var grid = pdfViewer.Template.FindName( "PART_Grid", pdfViewer ) as Grid;
   if ( null != grid )
   {
       grid.ColumnDefinitions[0].Width = GridLength.Auto;
   }


but it doesn't help.

Regards


3 Replies

KG Krithika Ganesan Syncfusion Team May 20, 2024 01:31 PM UTC

Hi Denis,


We can hide the vertical toolbar of PdfViewer using the below code snippet.


// Hides the thumbnail icon.

pdfViewer.ThumbnailSettings.IsVisible = false;

// Hides the bookmark icon.

pdfViewer.IsBookmarkEnabled = false;

// Hides the layer icon.

pdfViewer.EnableLayers = false;

// Hides the organize page icon.

pdfViewer.PageOrganizerSettings.IsIconVisible = false;

// Hides the redaction icon.

pdfViewer.EnableRedactionTool = false;  

// Hides the form icon.

pdfViewer.FormSettings.IsIconVisible = false;


Regards,

Krithika



DZ Denis Zakharenko May 21, 2024 11:42 AM UTC

It works!  Thank you!



KG Krithika Ganesan Syncfusion Team May 22, 2024 05:41 AM UTC

Most welcome, please get back to us for any further assistance.


Loader.
Up arrow icon