ClassRadFixedPageElement
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
RadFixedPageElement()
Initializes a new instance of the RadFixedPageElement class without an owner.
Declaration
public RadFixedPageElement()
RadFixedPageElement(RadFixedPage, RadPdfViewerElement)
Initializes a new instance of the RadFixedPageElement class with the specified page and owner.
Declaration
public RadFixedPageElement(RadFixedPage page, RadPdfViewerElement owner)
Parameters
page
The RadFixedPage to attach to this element.
owner
The RadPdfViewerElement that owns this page element.
RadFixedPageElement(RadPdfViewerElement)
Initializes a new instance of the RadFixedPageElement class with the specified owner.
Declaration
public RadFixedPageElement(RadPdfViewerElement owner)
Parameters
owner
The RadPdfViewerElement that owns this page element.
Properties
Data
Gets the logical RadFixedPage document model that is currently attached to this element through the virtualization interface.
Declaration
public RadFixedPage Data { get; }
Property Value
Implements
Page
Gets the logical RadFixedPage document model that is currently attached to this visual element.
PdfViewerElement
Gets the RadPdfViewerElement that owns and manages this page element.
Declaration
public RadPdfViewerElement PdfViewerElement { get; }
Property Value
Methods
ArrangeOverride(SizeF)
Arranges the page element and any annotation editors within the final layout bounds, applying scaling transformations.
Attach(RadFixedPage, object)
Attaches a PDF page to this element, initializing rendering workers and setting up event handlers for user interaction.
Declaration
public void Attach(RadFixedPage data, object context)
Parameters
data
The RadFixedPage to attach to this element.
context
Additional context information for the attachment operation.
Implements
CreateChildElements()
Creates and initializes the child elements with default appearance settings for PDF page display.
Declaration
protected override void CreateChildElements()
Overrides
Detach()
Detaches the currently attached page, cleaning up resources, event handlers, and background workers.
Declaration
public void Detach()
Implements
DrawAnnotation(IGraphics, Annotation)
Draws a visual highlight effect for the currently pressed or active annotation on the page.
Declaration
protected virtual void DrawAnnotation(IGraphics graphics, Annotation annot)
Parameters
graphics
The graphics context to draw onto.
annot
The Annotation to render with highlight effects.
DrawSelection(IGraphics)
Draws a visual highlight for the current text selection on the page using the configured selection color.
Declaration
protected virtual void DrawSelection(IGraphics graphics)
Parameters
graphics
The graphics context to draw onto.
IsCompatible(RadFixedPage, object)
Determines whether this element can be reused to display the specified page data.
Declaration
public virtual bool IsCompatible(RadFixedPage data, object context)
Parameters
data
The RadFixedPage to check for compatibility.
context
Additional context information for the compatibility check.
Returns
True if the element is compatible with the specified page; otherwise, false.
Implements
MeasureOverride(SizeF)
Measures the desired size of the page element based on the page dimensions and current scale factor.
OnAttached()
Called when a RadFixedPage is successfully attached to this element.
Declaration
protected virtual void OnAttached()
OnBeginDispose()
Initiates the disposal process by detaching any attached page and cleaning up resources.
Declaration
protected override void OnBeginDispose()
Overrides
OnDetached()
Called when the currently associated page is detached from this element.
Declaration
protected virtual void OnDetached()
OnSynchronized()
Called when the element needs to synchronize its state with the attached page data.
Declaration
protected virtual void OnSynchronized()
PaintContent(IGraphics)
Renders the PDF page content, including text selection highlights, annotations, and caret display.
Declaration
protected override void PaintContent(IGraphics graphics)
Parameters
graphics
The graphics context used for rendering the page content.
Overrides
Synchronize()
Synchronizes the element's visual state with the attached page, updating cached rendering and reinitializing background workers as needed.
Declaration
public void Synchronize()
Implements
UnwireEvents()
Unsubscribes from event handlers when the attached page is being detached to prevent memory leaks.
Declaration
protected virtual void UnwireEvents()
UpdateCaret()
Updates the caret position and visibility based on the current document state and viewer mode.
Declaration
public void UpdateCaret()
WireEvents()
Subscribes to event handlers for the newly attached page, including annotation interactions and caret position changes.
Declaration
protected virtual void WireEvents()