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

![WinUI RadPdfViewer ](https://www.telerik.com/winui/documentation/assets/5950b97f433b7e3a088d0f2b449b5345/radpdfviewer-pdf-toolbar-0.png)

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

#### **Use the RadPdfViewerToolBar control**

```XAML
<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`
* `HasPrintButton`
* `HasZoomInButton`
* `HasZoomOutButton`
* `HasPercentComboBox`
* `HasFitToWidthButton`
* `HasFitToPageButton`
* `HasPanTextSelectionGroup`

#### **Hide the rotation and the Page up and Page down buttons**

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

![WinUI RadPdfViewer ](https://www.telerik.com/winui/documentation/assets/ec17759c5bd0d8b9e5a5315c4be98539/radpdfviewer-pdf-toolbar-1.png)

## See Also

* [Getting Started with the Telerik UI for WinUI PdfViewer](https://www.telerik.com/winui/documentation/controls/radpdfviewer/getting-started)
* [Visual Structure](https://www.telerik.com/winui/documentation/controls/radpdfviewer/visual-structure)
