[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Collapse]Reporting
 [Expand]Product Information
 [Expand]Get Started with DevExpress Reporting
 [Expand]Create Popular Reports
 [Expand]Detailed Guide to DevExpress Reporting
 [Expand]Visual Studio Report Designer
 [Collapse]Create End-User Reporting Applications
   Cross-Platform Reporting
  [Expand]WinForms Reporting
  [Collapse]WPF Reporting
   [Expand]Print
   [Collapse]Document Preview
    [Expand]Quick Start
    [Collapse]GUI
      Toolbar Commands and Dialogs
      Document Preview Panels
      Document Preview Interactivity
    [Expand]API and Customization
   [Expand]End-User Report Designer
   [Expand]Application Security
   [Expand]Application Appearance
    Application Deployment
   [Expand]Localization
    End-User Documentation
  [Expand]Web Reporting
  [Expand]WCF Report Service
  [Expand]Discontinued Platforms
   Localization
   Redistribution and Deployment
 [Expand]API Reference
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Toolbar Commands and Dialogs

The Document Preview provides the following toolbars by default:

Each toolbar button triggers a specific command. The available commands are grouped into several categories.

File Commands:

Button Command Description
Open DocumentPreviewControl.OpenDocument Invokes the Open dialog for loading a document from a specified file.
Save DocumentPreviewControl.SaveCommand Invokes the Save As dialog for saving a document to a PRNX file.

Print Commands:

Button

Command

Description

Print...

DocumentPreviewControl.PrintCommand

Opens the Print dialog for printing a document.

Quick Print

DocumentPreviewControl.PrintDirectCommand

Prints a document using the system's default printer.

Page Setup...

DocumentPreviewControl.PageSetupCommand

Invokes the Page Setup dialog for specifying a document's page settings.

Scale

DocumentPreviewControl.ScaleCommand

Opens the Scale dialog for specifying a document's scaling options.

Navigation Commands:

Button Command Description
First Page DocumentPreviewControl.FirstPageCommand Navigates to a document's first page.
Previous Page DocumentViewerControl.PreviousPageCommand Navigates to a document's previous page.
Next Page DocumentViewerControl.NextPageCommand Navigates to a document's next page.
Last Page DocumentPreviewControl.LastPageCommand Navigates to a document's last page.
Navigation Pane DocumentPreviewControl.ToggleNavigationPaneCommand Opens the Navigation Pane for navigation through a document and search for text.

Zoom Commands:

Button

Command

Description

Zoom Out

DocumentViewerControl.ZoomOutCommand

Decreases a document's zoom factor.

Zoom

DocumentViewerControl.SetZoomFactorCommand

DocumentViewerControl.SetZoomModeCommand

Enables you to select a document's zoom factor or specify the zoom mode.

Zoom In

DocumentViewerControl.ZoomInCommand

Increases a document's zoom factor.

View Commands:

Button

Command

Description

Page Layout

DocumentPreviewControl.SetPageLayoutCommand

Enables you to select a document's page view:

  • Single Page

    Displays one document page at a time.

  • Two Pages

    Displays two document pages side-by-side.

  • Wrap Pages

    Displays pages side-by-side (the current zoom factor limits the number).

These settings affect the following property values:

Enable Continuous Scrolling

DocumentPreviewControl.ToggleEnableContinuousScrollingCommand

Specifies whether to skip to the beginning of the next page on reaching the end of the previous page, or enables continuous vertical scrolling.

This command is enabled only when the Page Layout is set either to Single Page or Two Pages.

Show Cover Page

DocumentPreviewControl.ToggleShowCoverPageCommand

Specifies whether to display the first document page separately or alongside the next document page.

This command is enabled only when the Page Layout is set to Two Pages.

Export Commands:

Button

Command

Description

Export...

DocumentPreviewControl.ExportCommand

Runs the Export Document dialog for exporting a document to a selected format and specifying the format-specific options.

Send...

DocumentPreviewControl.SendCommand

Invokes the Send via E-Mail dialog for sending a document by e-mail in a selected format and specifying the format-specific options.

You can remove an item from the list of available export formats by adding it to the DocumentPreviewControl.HiddenExportFormats collection.

Document Commands:

Most of the following commands toggle various Document Preview panels' visibility and interactive document features described in the Document Preview Panels document.

Button

Command

Description

Parameters

DocumentPreviewControl.ToggleParametersPanelCommand

Toggles the Parameters panel's visibility.

Document Map

DocumentPreviewControl.ToggleDocumentMapCommand

Toggles the Document Map panel's visibility.

The DocumentViewerControl.NavigateCommand enables you to navigate to a specific location in a document, corresponding to the item selected in the Document Map.

This button is visible if the DocumentPreviewControl.UseOfficeInspiredNavigationPane property is disabled.

Thumbnails

DocumentPreviewControl.ToggleThumbnailsCommand

Toggles the Thumbnails panel's visibility.

This button is visible if the DocumentPreviewControl.UseOfficeInspiredNavigationPane property is disabled.

Editing Fields

DocumentPreviewControl.ToggleEditingFieldsCommand

Highlights a document's editing fields.

This command corresponds to the DocumentPreviewControl.HighlightEditingFields property.

Search

DocumentViewerControl.ShowFindTextCommand

Toggles the Search panel's visibility.

This button is visible if the DocumentPreviewControl.UseOfficeInspiredNavigationPane property is disabled.

The DocumentViewerControl.FindTextCommand allows you to search for text within a displayed document.

Watermark

DocumentPreviewControl.SetWatermarkCommand

Opens the Watermark dialog for specifying a text and/or picture watermark for a document's pages.

Status Bar

The Document Preview provides a status bar displaying the current page number, the document build progress (while document pages are being created) and the document zoom factor.

The status bar actions correspond to the following commands.

Context Menu

Right-clicking a loaded document invokes a context menu where you can switch the cursor mode or copy the selected document content.

These actions correspond to the following commands:

Tip

See Quick Guide to Print Preview Customization to learn how to customize the Document Viewer's commands and dialogs.

Is this topic helpful?​​​​​​​