Class 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.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.PdfViewer.dll
Syntax
public class RadFixedPageElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, IVirtualizedElement<RadFixedPage>
Constructors
RadFixedPageElement()
Initializes a new instance of the RadFixedPageElement class without an owner.
Declaration
public RadFixedPageElement()
RadFixedPageElement(RadPdfViewerElement)
Initializes a new instance of the RadFixedPageElement class with the specified owner.
Declaration
public RadFixedPageElement(RadPdfViewerElement owner)
Parameters
|
RadPdfViewerElement
owner
The RadPdfViewerElement that owns this page element. |
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
|
RadFixedPage
page
The RadFixedPage to attach to this element. |
|
RadPdfViewerElement
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
|
RadFixedPage
|
Implements
Page
Gets the logical RadFixedPage document model that is currently attached to this visual element.
Declaration
public RadFixedPage Page { get; }
Property Value
|
RadFixedPage
|
PdfViewerElement
Gets the RadPdfViewerElement that owns and manages this page element.
Declaration
public RadPdfViewerElement PdfViewerElement { get; }
Property Value
|
RadPdfViewerElement
|
Methods
ArrangeOverride(SizeF)
Arranges the page element and any annotation editors within the final layout bounds, applying scaling transformations.
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
|
System.Drawing.SizeF
finalSize
The final size allocated for the page element. |
Returns
|
System.Drawing.SizeF
The actual size used by the page element. |
Overrides
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
|
RadFixedPage
data
The RadFixedPage to attach to this element. |
|
System.Object
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
|
IGraphics
graphics
The graphics context to draw onto. |
|
Annotation
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
|
IGraphics
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
|
RadFixedPage
data
The RadFixedPage to check for compatibility. |
|
System.Object
context
Additional context information for the compatibility check. |
Returns
|
System.Boolean
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.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
|
System.Drawing.SizeF
availableSize
The available size for layout. |
Returns
|
System.Drawing.SizeF
The desired size calculated from the page dimensions and scale factor. |
Overrides
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
|
IGraphics
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()