var radPdfViewer1 = sender as RadPdfViewer; var editingFields = radPdfViewer1.PdfViewerElement.GetType().GetProperty("EditingFields", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(radPdfViewer1.PdfViewerElement) as EditingFields; var curPage = radPdfViewer1.PdfViewerElement.CurrentPage; var pageElement = radPdfViewer1.PdfViewerElement.ViewElement.Children[0] as RadFixedPageElement;
RadElement editor = null;
foreach (RadFixedPageElement visualPage in radPdfViewer1.PdfViewerElement.ViewElement.Children) { if (visualPage.Children.Count >= 1) { curPage = visualPage.Page; pageElement = visualPage; editor = visualPage.Children.FirstOrDefault();
} }
if (editor != null) { for (int i = 0; i < curPage.Annotations.Count; i++) { Annotation annot = curPage.Annotations[i];
var rect = (Rect)typeof(Annotation).GetProperty("BoundingRect", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(annot);