Back to Devexpress

How to: Replace a Standard PDF Viewer Control Command with a Custom Command

wpf-120545-controls-and-libraries-pdf-viewer-examples-commands-how-to-replace-a-standard-pdf-viewer-control-command-with-a-custom-command.md

latest654 B
Original Source

How to: Replace a Standard PDF Viewer Control Command with a Custom Command

  • Mar 20, 2025
  • 3 minutes to read

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

  1. Create a custom command provider class inherited from the PdfCommandProvider class and override its members to create a new DelegateCommand.

  2. Implement ZoomIn and CanZoomIn ( ZoomOut and CanZoomOut ) methods that the corresponding delegate command will call when the command is executed.

  3. Use the created CustomPdfCommandProvider to substitute the default command provider.