Skip to main content

DocumentViewerCommands.GoToPageCommand Property

Gets or sets the command that navigates to a specific page of the document.

Namespace: DevExpress.WinUI.DocumentViewer

Assembly: DevExpress.WinUI.DocumentViewer.v23.2.dll

NuGet Package: DevExpress.WinUI

Declaration

public ICommand GoToPageCommand { get; protected set; }

Property Value

Type Description
ICommand

A command that implements the ICommand interface.

Remarks

The command accepts a zero-based Int32 value as a parameter that is the index of the page that the DocumentViewer should open.

This command is executed when you specify a page and press Enter in the DocumentViewer‘s document navigation panel.

Example

The following code sample opens the document’s page whose index is 2, when a user clicks the Button:

<Window ...
    xmlns:dxdvr="using:DevExpress.WinUI.DocumentViewer">
    <StackPanel Orientation="Vertical">
        <dxdvr:DocumentViewer x:Name="documentviewer" DocumentSource="ms-appx:///data/Invoice.prnx" Height="700" />
        <Button Command="{x:Bind documentviewer.Commands.GoToPageCommand}" Content="Go to 3rd Page" CommandParameter="2"/>
    </StackPanel>
</Window>
See Also