DocumentViewer.Save(String) Method
In This Article
Saves the opened document to the specified file in PRNX format.
Namespace: DevExpress.WinUI.DocumentViewer
Assembly: DevExpress.WinUI.DocumentViewer.v23.2.dll
NuGet Package: DevExpress.WinUI
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
path | String | The path to the file where the document is stored. |
#Remarks
The following code sample saves the opened document as a file in PRNX format to the specified path:
<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="Save Report to a File" Click="Button_Click"/>
</StackPanel>
</Window>
private void Button_Click(object sender, RoutedEventArgs e) {
documentviewer.Save("C:\\Users\\User\\Documents\\Invoice_Report.prnx");
}
#Open Save Dialog
You can use the ShowSaveDialogCommand or click the Save As button in the command bar to open the Save As dialog.
See Also