Example #1
0
 public static string GetSelectionAsText(this PreviewControl previewControl)
 {
     if (previewControl.GetPdfViewer()?.GetSelectedContentFromType(ContentType.Text) is TextContent textcontent)
     {
         return(textcontent.Text);
     }
     return(null);
 }
Example #2
0
 public static void ClearSelection(this PreviewControl previewControl)
 {
     previewControl.GetPdfViewer()?.ClearSelection();
 }
        public static PDFViewWPF GetPdftronViewer(this PreviewControl previewControl)
        {
            var pdfViewControl = previewControl.GetPdfViewer();

            return(pdfViewControl.GetType().GetProperty("Viewer", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(pdfViewControl) as PDFViewWPF);
        }