From 408a866ec970ba03b4001020dfc0b190aca20215 Mon Sep 17 00:00:00 2001 From: Yaminisrisf4389 Date: Thu, 24 Oct 2024 16:11:10 +0530 Subject: [PATCH 1/8] 905578 --- wpf/Pdf-Viewer/Saving-the-PDF-document.md | 37 +++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/wpf/Pdf-Viewer/Saving-the-PDF-document.md b/wpf/Pdf-Viewer/Saving-the-PDF-document.md index a6f5a479c..6d2d00657 100644 --- a/wpf/Pdf-Viewer/Saving-the-PDF-document.md +++ b/wpf/Pdf-Viewer/Saving-the-PDF-document.md @@ -75,6 +75,43 @@ namespace SaveEvents {% endhighlight %} {% endtabs %} +### Canceling save in Save events + +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). + +{% tabs %} +{% highlight c# %} + +namespace SaveEvents +{ + public partial class MainWindow : Window + { + #region Constructor + public MainWindow() + { + InitializeComponent(); + //Wire the `BeginSave` event. + PdfViewer.BeginSave += PdfViewer_BeginSave; + //Load the PDF file + PdfViewer.Load("../../Data/Windows Store Apps Succinctly.pdf"); + } + #endregion + + #region Events + private void PdfViewer_BeginSave(object sender, BeginSaveEventArgs e) + { + //Insert your code here + + //Cancel the save operation + e.Cancel = true; + } + #endregion + } +} + +{% endhighlight %} +{% endtabs %} + ### End Save 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). From d27a49dca07af23adce63419c6d4324a32dd57df Mon Sep 17 00:00:00 2001 From: Yaminisrisf4389 Date: Thu, 24 Oct 2024 16:21:05 +0530 Subject: [PATCH 2/8] 905578 --- wpf/Pdf-Viewer/Saving-the-PDF-document.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wpf/Pdf-Viewer/Saving-the-PDF-document.md b/wpf/Pdf-Viewer/Saving-the-PDF-document.md index 6d2d00657..d4eac645a 100644 --- a/wpf/Pdf-Viewer/Saving-the-PDF-document.md +++ b/wpf/Pdf-Viewer/Saving-the-PDF-document.md @@ -101,9 +101,9 @@ namespace SaveEvents private void PdfViewer_BeginSave(object sender, BeginSaveEventArgs e) { //Insert your code here - - //Cancel the save operation - e.Cancel = true; + + //Cancel the save operation + e.Cancel = true; } #endregion } From ce828c0f548ebc78e4c518211e5b0b60dee5a3cc Mon Sep 17 00:00:00 2001 From: Yaminisrisf4389 Date: Fri, 25 Oct 2024 12:19:10 +0530 Subject: [PATCH 3/8] 905578_feedback_addressed --- wpf/Pdf-Viewer/Saving-the-PDF-document.md | 39 +++++++++-------------- 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/wpf/Pdf-Viewer/Saving-the-PDF-document.md b/wpf/Pdf-Viewer/Saving-the-PDF-document.md index d4eac645a..57a194b3a 100644 --- a/wpf/Pdf-Viewer/Saving-the-PDF-document.md +++ b/wpf/Pdf-Viewer/Saving-the-PDF-document.md @@ -82,33 +82,24 @@ The [BeginSave](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer. {% tabs %} {% highlight c# %} -namespace SaveEvents -{ - public partial class MainWindow : Window + public MainWindow() + { + InitializeComponent(); + //Wire the `BeginSave` event. + PdfViewer.BeginSave += PdfViewer_BeginSave; + //Load the PDF file + PdfViewer.Load("../../Data/Windows Store Apps Succinctly.pdf"); + } + #region Events + private void PdfViewer_BeginSave(object sender, BeginSaveEventArgs e) { - #region Constructor - public MainWindow() - { - InitializeComponent(); - //Wire the `BeginSave` event. - PdfViewer.BeginSave += PdfViewer_BeginSave; - //Load the PDF file - PdfViewer.Load("../../Data/Windows Store Apps Succinctly.pdf"); - } - #endregion + //Insert your code here - #region Events - private void PdfViewer_BeginSave(object sender, BeginSaveEventArgs e) - { - //Insert your code here - - //Cancel the save operation - e.Cancel = true; - } - #endregion + //Cancel the save operation + e.Cancel = true; } -} - + #endregion + {% endhighlight %} {% endtabs %} From 8db4256c5af3e6ec02f477535dc42713894679a5 Mon Sep 17 00:00:00 2001 From: Yaminisrisf4389 Date: Fri, 25 Oct 2024 12:21:07 +0530 Subject: [PATCH 4/8] 905578 --- wpf/Pdf-Viewer/Saving-the-PDF-document.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpf/Pdf-Viewer/Saving-the-PDF-document.md b/wpf/Pdf-Viewer/Saving-the-PDF-document.md index 57a194b3a..dec03ff02 100644 --- a/wpf/Pdf-Viewer/Saving-the-PDF-document.md +++ b/wpf/Pdf-Viewer/Saving-the-PDF-document.md @@ -96,7 +96,7 @@ The [BeginSave](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer. //Insert your code here //Cancel the save operation - e.Cancel = true; + e.Cancel = true; } #endregion From 412ad27f99b0e7a570af8d8e387b06a762849aae Mon Sep 17 00:00:00 2001 From: Yaminisrisf4389 Date: Fri, 25 Oct 2024 12:32:17 +0530 Subject: [PATCH 5/8] 905578 --- wpf/Pdf-Viewer/Saving-the-PDF-document.md | 32 ++++++++++++----------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/wpf/Pdf-Viewer/Saving-the-PDF-document.md b/wpf/Pdf-Viewer/Saving-the-PDF-document.md index dec03ff02..1e41312da 100644 --- a/wpf/Pdf-Viewer/Saving-the-PDF-document.md +++ b/wpf/Pdf-Viewer/Saving-the-PDF-document.md @@ -82,24 +82,26 @@ The [BeginSave](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer. {% tabs %} {% highlight c# %} - public MainWindow() - { - InitializeComponent(); - //Wire the `BeginSave` event. - PdfViewer.BeginSave += PdfViewer_BeginSave; - //Load the PDF file - PdfViewer.Load("../../Data/Windows Store Apps Succinctly.pdf"); - } - #region Events - private void PdfViewer_BeginSave(object sender, BeginSaveEventArgs e) + public MainWindow() { - //Insert your code here + InitializeComponent(); + //Wire the `BeginSave` event. + PdfViewer.BeginSave += PdfViewer_BeginSave; + //Load the PDF file + PdfViewer.Load("../../Data/Windows Store Apps Succinctly.pdf"); + } + + #region Events + private void PdfViewer_BeginSave(object sender, BeginSaveEventArgs e) + { + //Insert your code here - //Cancel the save operation - e.Cancel = true; + //Cancel the save operation + e.Cancel = true; } - #endregion - + #endregion + + {% endhighlight %} {% endtabs %} From 448f18a36661dcede6c6b11cfaa6872a2328933c Mon Sep 17 00:00:00 2001 From: Yaminisrisf4389 Date: Fri, 25 Oct 2024 12:33:04 +0530 Subject: [PATCH 6/8] 905578 --- wpf/Pdf-Viewer/Saving-the-PDF-document.md | 1 - 1 file changed, 1 deletion(-) diff --git a/wpf/Pdf-Viewer/Saving-the-PDF-document.md b/wpf/Pdf-Viewer/Saving-the-PDF-document.md index 1e41312da..48169144b 100644 --- a/wpf/Pdf-Viewer/Saving-the-PDF-document.md +++ b/wpf/Pdf-Viewer/Saving-the-PDF-document.md @@ -101,7 +101,6 @@ The [BeginSave](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer. } #endregion - {% endhighlight %} {% endtabs %} From 5ca5cab2d1773d1b6d2c128ce295cdb837df7816 Mon Sep 17 00:00:00 2001 From: Yaminisrisf4389 Date: Fri, 25 Oct 2024 12:38:05 +0530 Subject: [PATCH 7/8] 905578 --- wpf/Pdf-Viewer/Saving-the-PDF-document.md | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/wpf/Pdf-Viewer/Saving-the-PDF-document.md b/wpf/Pdf-Viewer/Saving-the-PDF-document.md index 48169144b..a8af1f384 100644 --- a/wpf/Pdf-Viewer/Saving-the-PDF-document.md +++ b/wpf/Pdf-Viewer/Saving-the-PDF-document.md @@ -82,24 +82,24 @@ The [BeginSave](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer. {% tabs %} {% highlight c# %} - public MainWindow() - { - InitializeComponent(); - //Wire the `BeginSave` event. - PdfViewer.BeginSave += PdfViewer_BeginSave; - //Load the PDF file - PdfViewer.Load("../../Data/Windows Store Apps Succinctly.pdf"); - } +public MainWindow() +{ + InitializeComponent(); + //Wire the `BeginSave` event. + PdfViewer.BeginSave += PdfViewer_BeginSave; + //Load the PDF file + PdfViewer.Load("../../Data/Windows Store Apps Succinctly.pdf"); +} - #region Events - private void PdfViewer_BeginSave(object sender, BeginSaveEventArgs e) - { - //Insert your code here +#region Events +private void PdfViewer_BeginSave(object sender, BeginSaveEventArgs e) +{ + //Insert your code here - //Cancel the save operation - e.Cancel = true; - } - #endregion + //Cancel the save operation + e.Cancel = true; +} +#endregion {% endhighlight %} {% endtabs %} From ce4cddc7fe92326ed5c8c16254c700d051e6942b Mon Sep 17 00:00:00 2001 From: Yaminisrisf4389 Date: Fri, 25 Oct 2024 12:43:01 +0530 Subject: [PATCH 8/8] 905578 --- wpf/Pdf-Viewer/Saving-the-PDF-document.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/wpf/Pdf-Viewer/Saving-the-PDF-document.md b/wpf/Pdf-Viewer/Saving-the-PDF-document.md index a8af1f384..9b4575fd9 100644 --- a/wpf/Pdf-Viewer/Saving-the-PDF-document.md +++ b/wpf/Pdf-Viewer/Saving-the-PDF-document.md @@ -84,20 +84,20 @@ The [BeginSave](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer. public MainWindow() { - InitializeComponent(); - //Wire the `BeginSave` event. - PdfViewer.BeginSave += PdfViewer_BeginSave; - //Load the PDF file - PdfViewer.Load("../../Data/Windows Store Apps Succinctly.pdf"); + InitializeComponent(); + // Wire the `BeginSave` event. + PdfViewer.BeginSave += PdfViewer_BeginSave; + // Load the PDF file + PdfViewer.Load("../../Data/Windows Store Apps Succinctly.pdf"); } - + #region Events private void PdfViewer_BeginSave(object sender, BeginSaveEventArgs e) { - //Insert your code here + // Insert your code here - //Cancel the save operation - e.Cancel = true; + // Cancel the save operation + e.Cancel = true; } #endregion