DocumentViewer.Commands Property
In This Article
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 |
---|---|
Document |
A set of Document |
#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