Skip to main content

DocumentViewer.Commands Property

Provides access to DocumentViewer commands.

Namespace: DevExpress.WinUI.DocumentViewer

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

NuGet Package: DevExpress.WinUI

Declaration

[DP(null, Handler = "OnCommandsChanged")]
public DocumentViewerCommands Commands { get; set; }

Property Value

Type Description
DocumentViewerCommands

A set of DocumentViewer commands.

Remarks

Use the Commands property to obtain a DocumentViewer command. You can bind a command to a UI element.

The following code sample closes the document when you click 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 Content="Close Document" Command="{x:Bind documentviewer.Commands.CloseDocumentCommand}"/>
    </StackPanel>
</Window>
See Also