Some test text!

Search
Hamburger Icon

UWP / Guides / Toolbar Customization

APIs to customize the toolbar in UWP viewer

This is a quick guide on re-ordering and customizing the toolbar when using the PDF Viewer in the UWP Tools SDK.

The code snippet below will setup the AnnotationToolbarOptions class, which stores a list of buttons to add to the toolbar. Adding buttons to the list during initialization will adjust what is available on the toolbar.

pdftron.PDF.Tools.Controls.AnnotationToolbarOptions annotationToolbarOptions = new pdftron.PDF.Tools.Controls.AnnotationToolbarOptions();
            List<ToolbarButtonType> mainToolBarItems = new List<ToolbarButtonType>();
            mainToolBarItems.Add(ToolbarButtonType.Pan);
            // Add buttons to toolbar....

            annotationToolbarOptions.MainToolbarItems = mainToolBarItems;
            mAnnotationToolbar = new pdftron.PDF.Tools.Controls.AnnotationCommandBar(mToolManager, annotationToolbarOptions);
            //mAnnotationToolbar.IsInkToolButtonVisible = false;
            //mAnnotationToolbar.IsSignatureToolButtonVisible = false;

Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales