> 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
