You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: wpf/Pdf-Viewer/Saving-the-PDF-document.md
+29Lines changed: 29 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,35 @@ namespace SaveEvents
75
75
{% endhighlight %}
76
76
{% endtabs %}
77
77
78
+
### Canceling save in Save events
79
+
80
+
The [BeginSave](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_BeginSave) event occurs before initiating the save operation of the PDF file. It also allows you to cancel the save operation using the [Cancel](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.BeginSaveEventArgs.html#Syncfusion_Windows_PdfViewer_BeginSaveEventArgs_Cancel) property of [BeginSaveEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.BeginSaveEventArgs.html). The following code shows how to wire the event in the [PdfViewerControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html).
81
+
82
+
{% tabs %}
83
+
{% highlight c# %}
84
+
85
+
public MainWindow()
86
+
{
87
+
InitializeComponent();
88
+
// Wire the `BeginSave` event.
89
+
PdfViewer.BeginSave += PdfViewer_BeginSave;
90
+
// Load the PDF file
91
+
PdfViewer.Load("../../Data/Windows Store Apps Succinctly.pdf");
The [EndSave](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_EndSave) event occurs after the completion of the save operation. The [IsCanceled](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.EndSaveEventArgs.html#Syncfusion_Windows_PdfViewer_EndSaveEventArgs_IsCanceled) property of the [EndSaveEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.EndSaveEventArgs.html) helps you to know whether the save operation is canceled or not. The following code shows how to wire the event in the [PdfViewerControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html).
0 commit comments