Skip to content

Use the PdfViewerCommandFactoryService interface to substitute the default command with your own custom command.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/winforms-pdf-viewer-replace-standard-command-with-custom-command

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF Viewer for WinForms - Replace Standard PDF Viewer Control Command with a Custom Command

This example shows how to modify the functionality of an existing PDF Viewer command.

Implementation Details

The WinForms PDF Viewer exposes the IPdfViewerCommandFactoryService interface that enables you to substitute the default command with your own custom command.

Create a custom command class (e.g., a CustomNextPageCommand class), inherited from the command that you wish to replace (e.g., PdfNextPageCommand). Override the required method of the command. The main functionality and command specifics is located in the Execute method.

Create a class (e.g., CustomPdfViewerCommandFactoryService) implementing the IPdfViewerCommandFactoryService. Override the CreateCommand method to create an instance of a custom command class if an identifier of a certain command is passed as a parameter. Use the created class to substitute the default PdfViewer's service.

Files to Review

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Use the PdfViewerCommandFactoryService interface to substitute the default command with your own custom command.

Topics

Resources

License

Stars

Watchers

Forks