RadFixedPageElement
Represents a visual element that displays a single PDF page within a RadPdfViewer control. This element handles page rendering, virtualization, text selection, annotation display, and user interaction for individual PDF pages.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.PdfViewer.dll
Syntax:
public class RadFixedPageElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, IVirtualizedElement<RadFixedPage>
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadFixedPageElement...
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadFixedPageElement class without an owner.
public RadFixedPageElement()
Initializes a new instance of the RadFixedPageElement class with the specified page and owner.
public RadFixedPageElement(RadFixedPage page, RadPdfViewerElement owner)
The RadFixedPage to attach to this element.
ownerRadPdfViewerElementThe RadPdfViewerElement that owns this page element.
Initializes a new instance of the RadFixedPageElement class with the specified owner.
public RadFixedPageElement(RadPdfViewerElement owner)
The RadPdfViewerElement that owns this page element.
Properties
Gets the logical RadFixedPage document model that is currently attached to this element through the virtualization interface.
public RadFixedPage Data { get; }
Implements:
Gets the logical RadFixedPage document model that is currently attached to this visual element.
public RadFixedPage Page { get; }
Gets the RadPdfViewerElement that owns and manages this page element.
public RadPdfViewerElement PdfViewerElement { get; }
Methods
Arranges the page element and any annotation editors within the final layout bounds, applying scaling transformations.
Attaches a PDF page to this element, initializing rendering workers and setting up event handlers for user interaction.
public void Attach(RadFixedPage data, object context)
The RadFixedPage to attach to this element.
contextobjectAdditional context information for the attachment operation.
Implements:
Creates and initializes the child elements with default appearance settings for PDF page display.
protected override void CreateChildElements()
Overrides:
Detaches the currently attached page, cleaning up resources, event handlers, and background workers.
public void Detach()
Implements:
Draws a visual highlight effect for the currently pressed or active annotation on the page.
protected virtual void DrawAnnotation(IGraphics graphics, Annotation annot)
The graphics context to draw onto.
annotAnnotationThe Annotation to render with highlight effects.
Draws a visual highlight for the current text selection on the page using the configured selection color.
protected virtual void DrawSelection(IGraphics graphics)
The graphics context to draw onto.
Determines whether this element can be reused to display the specified page data.
public virtual bool IsCompatible(RadFixedPage data, object context)
The RadFixedPage to check for compatibility.
contextobjectAdditional context information for the compatibility check.
Returns:True if the element is compatible with the specified page; otherwise, false.
Implements:
Measures the desired size of the page element based on the page dimensions and current scale factor.
Called when a RadFixedPage is successfully attached to this element.
protected virtual void OnAttached()
Initiates the disposal process by detaching any attached page and cleaning up resources.
protected override void OnBeginDispose()
Overrides:
Called when the currently associated page is detached from this element.
protected virtual void OnDetached()
Called when the element needs to synchronize its state with the attached page data.
protected virtual void OnSynchronized()
Renders the PDF page content, including text selection highlights, annotations, and caret display.
protected override void PaintContent(IGraphics graphics)
The graphics context used for rendering the page content.
Overrides:
Synchronizes the element's visual state with the attached page, updating cached rendering and reinitializing background workers as needed.
public void Synchronize()
Implements:
Unsubscribes from event handlers when the attached page is being detached to prevent memory leaks.
protected virtual void UnwireEvents()
Updates the caret position and visibility based on the current document state and viewer mode.
public void UpdateCaret()
Subscribes to event handlers for the newly attached page, including annotation interactions and caret position changes.
protected virtual void WireEvents()