This example illustrates how to hide specific export formats available in the Document Viewer toolbar. To accomplish this task, create an external Ribbon toolbar and assign it to the Document Viewer.
To add a Ribbon extension to a view, call the ExtensionsFactory.Ribbon helper method. This method's parameter provides access to the Ribbon settings provided by the RibbonSettings class allowing you to completely customize the extension. For this example, obtain the Document Viewer's ribbon items using the DocumentViewerExtension.DefaultRibbonTabs property and hide items corresponding to the required export formats.
To link the created Ribbon with the Document Viewer, set the DocumentViewerSettings.ToolbarMode property to ExternalRibbon and specify the DocumentViewerSettings.AssociatedRibbonName property.
↧
Document Viewer - Ribbon - How to customize the list of export formats
↧