Current filter:
                                You should refresh the page.
                                Support Center
                                This example shows how to modify the functionality of an existing PDF Viewer command.

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

                                Show Implementation Details
                                To accomplish this task:

                                - 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. You should 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. So, instead of the default command, a custom command will be used by the PdfViewer.
                                - Use the created class to substitute the default PdfViewer’s service.
                                Select file
                                • CustomNextPageCommand.cs
                                • CustomPdfViewerCommandFactoryService.cs
                                • Form1.cs
                                • Program.cs
                                Select language
                                • C#
                                • VB.NET
                                Select version
                                • 15.2.5 - 17.2.7

                                If you need additional product information, write to us at or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2018 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners