New to Telerik UI for WinUI? Download free 30-day trial

ToolBar

PdfViewer comes with pre-defined toolbar UI that is automatically wired with all of the commands provided by the viewer.

The RadPdfViewerToolbar control compliments RadPdfViewer, with convenient options that allows you to save and open files, zoom the document, rotate it and more.

To use the toolbar, define the RadPdfViewerToolBar element and set its RadPdfViewer property.

Using the RadPdfViewerToolBar

<Grid> 
    <Grid.RowDefinitions> 
        <RowDefinition Height="Auto"/> 
        <RowDefinition/> 
    </Grid.RowDefinitions> 
    <telerik:RadPdfViewerToolBar RadPdfViewer="{Binding ElementName=pdfViewer, Mode=OneTime}"  /> 
    <telerik:RadPdfViewer Grid.Row="1" 
                          x:Name="pdfViewer"  
                          DocumentSource="ms-appx:///PdfFiles/Sample.pdf" /> 
</Grid> 

The visibility of the buttons in the toolbar can be toggled using the following bool properties of RadPdfViewerToolBar.

  • HasOpenButton
  • HasSaveButton
  • HasCounterclockwiseButton
  • HasClockwiseButton
  • HasPageUpButton
  • HasPageDownButton
  • HasPagesCountGroup
  • HasZoomInButton
  • HasZoomOutButton
  • HasPercentComboBox
  • HasFitToWidthButton
  • HasFitToPageButton
  • HasPanTextSelectionGroup

Hiding the rotation and page up/down buttons

<telerik:RadPdfViewerToolBar RadPdfViewer="{Binding ElementName=pdfViewer, Mode=OneTime}"  
                             HasCounterclockwiseButton="False" 
                             HasClockwiseButton="False" 
                             HasPageDownButton="False" 
                             HasPageUpButton="False" 
                             HasPagesCountGroup="False"/> 

See Also

In this article
Not finding the help you need?