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

Toolbar

The PdfViewer comes with predefined toolbar UI elements that are automatically wired with all supported commands.

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

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

Use the RadPdfViewerToolBar control

<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> 

To toggle the visibility of the buttons in the toolbar, use the following bool properties of RadPdfViewerToolBar:

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

Hide the rotation and the Page up and Page 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?