Skip to content

Commit dc69516

Browse files
871183
1 parent 296f3b8 commit dc69516

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

wpf/Pdf-Viewer/How-To/Unload-the-document.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,7 @@ documentation: ug
99

1010
# Unload the document in Pdf Viewer
1111

12-
PDF Viewer allows you to unload the PDF document with the [Unload](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_Unload) method of the [PdfViewerControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html) and [PdfDocumentView](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfDocumentView.html) classes.The Unload method is used only for unloading the document. The following code sample illustrates the same.
13-
14-
{% tabs %}
15-
{% highlight c# %}
16-
17-
private void button1_Click(object sender, RoutedEventArgs e)
18-
{
19-
//Unload the PDF document
20-
pdfviewer.Unload();
21-
}
22-
23-
{% endhighlight %}
24-
{% highlight VB %}
25-
26-
Private Sub button1_Click(sender As Object, e As RoutedEventArgs)
27-
'Unload the PDF document
28-
pdfviewer.Unload()
29-
End Sub
30-
31-
{% endhighlight %}
32-
{% endtabs %}
33-
34-
The [Unload(Boolean)](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_Unload_System_Boolean_) method of the [PdfViewerControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html) and [PdfDocumentView](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfDocumentView.html) classes includes an optional Boolean parameter to control the disposal of the loaded document. When this parameter is set to true, the method fully disposes of the loaded document. By default, the parameter is set to false.
12+
PDF Viewer allows you to unload the PDF document with the [Unload(Boolean)](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_Unload_System_Boolean_) method of the [PdfViewerControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html) and [PdfDocumentView](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfDocumentView.html) classes.This method includes an optional Boolean parameter to control the disposal of the loaded document.When the parameter is set to true, the method fully disposes of the loaded document, releasing all associated memory and resources. By default, the parameter is set to false, which unloads the document without disposing of it completely, allowing it to be reused if needed.The following code sample illustrates the same.
3513

3614
{% tabs %}
3715
{% highlight c# %}

0 commit comments

Comments
 (0)