> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/uwp/viewer/viewer-control-config.md).

# Customize the ViewerControl in UWP

Customize and configure ViewerControl and AnnotationCommandBar easily with internal properties. Enable/disable features and access API documentation for full settings. Optimize your UI components now!

[ViewerControl](/uwp/viewer/using-viewercontrol.md) is configurable and can be easily customized using it's internal properties which enables the UI components to be hidden and functionalities be disabled.

## Configure ViewerControl

The control has a set of options to enable/disable features in the component.

**For example:**

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
var viewerCtrl = new ViewerControl();

viewerCtrl.ShowAnnotationToolbarButton = true;
viewerCtrl.ShowPrintOption = true;
viewerCtrl.ShowSaveAsOption = true;
viewerCtrl.ShowShareOption = true;
viewerCtrl.ShowTextSearchOption = true;
viewerCtrl.ShowThumbnailView = true;
viewerCtrl.ShowPDFCompare = true;
viewerCtrl.ShowExportXFDF = true;
viewerCtrl.ShowActionsOption = true;
viewerCtrl.ShowCropView = true;

StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Resources/GettingStarted.pdf"));
if (file != null)
    await viewerCtrl.ActivateWithFileAsync(file);
```

{% endcode %}
{% endtab %}
{% endtabs %}

A full list of settings for `ViewerControl` can be found in the [API documentation](https://sdk.apryse.com/api/uwp/tools/api/pdftron.PDF.Tools.Controls.Viewer.ViewerControl.html)

### AnnotationCommandBar

You also have the ability to access and configure the internal ViewerControl's `Annotation Toolbar`.

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
var viewerCtrl = new ViewerControl();

viewerCtrl.AnnotationToolbar.IsArrowToolButtonVisible = true;
viewerCtrl.AnnotationToolbar.IsCloudToolButtonVisible = true;
viewerCtrl.AnnotationToolbar.IsLassoToolButtonVisible = true;
viewerCtrl.AnnotationToolbar.IsMarqueeZoomToolButtonVisible = true;

StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Resources/GettingStarted.pdf"));
if (file != null)
    await ViewerControl.ActivateWithFileAsync(file);
```

{% endcode %}
{% endtab %}
{% endtabs %}

A full list of settings for `AnnotationCommandBar` can be found in the [API documentation](https://sdk.apryse.com/api/uwp/tools/api/pdftron.PDF.Tools.Controls.AnnotationCommandBar.html)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/uwp/viewer/viewer-control-config.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
