Exemple #1
1
 private void removePDFControls()
 {
     try
     {
         foreach (Control p in pnlPDFViewer.Controls)
         {
             if (p.GetType() == typeof(AxAcroPDFLib.AxAcroPDF))
             {
                 AxAcroPDFLib.AxAcroPDF c = (AxAcroPDFLib.AxAcroPDF)p;
                 c.Visible = false;
                 pnlPDFViewer.Controls.Remove(c);
                 c.Dispose();
             }
         }
     }
     catch (Exception ex)
     {
     }
 }
Exemple #2
0
 private void Dispose()
 {
     if (axAcroPDF1 != null)
     {
         axAcroPDF1.Dispose();
         axAcroPDF1 = null;
     }
 }
Exemple #3
0
 private void PageUnloaded(object sender, RoutedEventArgs e)
 {
     this.Stage.Children.Remove(host);
     pdfviewer.Dispose();
     pdfviewer = null;
     host.Dispose();
     host = null;
 }