This example demonstrates how to override a command in the Document Preview.
To override a command in DocumentPreviewControl, create a DocumentPreviewControl descendant and use either of the following approaches.
1. Handle a command by overriding the corresponding method of DocumentPreviewControl. E.g., handle the Export command by overriding the CanExport and Export methods.
2. Implement a custom DocumentCommandProvider to override a required command.
This example demonstrates how to override (disable) the Export To PDF Document Preview command by using both these solutions.
NOTE
DocumentPreviewControl is available starting with version 15.1. For an older document preview, use the approach given at How to override existing export (send) command handlers in the DocumentPreview toolbar.
To override a command in DocumentPreviewControl, create a DocumentPreviewControl descendant and use either of the following approaches.
1. Handle a command by overriding the corresponding method of DocumentPreviewControl. E.g., handle the Export command by overriding the CanExport and Export methods.
2. Implement a custom DocumentCommandProvider to override a required command.
This example demonstrates how to override (disable) the Export To PDF Document Preview command by using both these solutions.
NOTE
DocumentPreviewControl is available starting with version 15.1. For an older document preview, use the approach given at How to override existing export (send) command handlers in the DocumentPreview toolbar.