This example demonstrates how to customize the DocumentViewer control's toolbar (either BarManager or RibbonControl).
In particular, it shows how to remove a standard button from it and add custom ones.
You can bind your custom logic to a button either in the ItemClick event handler or using the View Model commands.
See Also:
How to override existing export (send) command handlers in the DocumentPreview toolbar