ClassRadPdfViewer
A comprehensive PDF document viewer control for .NET MAUI applications that provides rich document display, navigation, zooming, text search, text selection, and interactive features. The RadPdfViewer offers professional-grade PDF viewing capabilities with extensive customization options and seamless integration with complementary controls.
Definition
Namespace:Telerik.Maui.Controls
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class RadPdfViewer : RadLayout
Inheritance: objectRadLayoutRadPdfViewer
Inherited Members
Constructors
RadPdfViewer()
Initializes a new instance of the RadPdfViewer class.
Declaration
public RadPdfViewer()
Fields
BackgroundColorProperty
Identifies the BackgroundColor property.
Declaration
public static readonly BindableProperty BackgroundColorProperty
Field Value
BindableProperty
BusyIndicatorTemplateProperty
Identifies the BusyIndicatorTemplate property.
Declaration
public static readonly BindableProperty BusyIndicatorTemplateProperty
Field Value
BindableProperty
CloseSearchViewCommandProperty
Identifies the CloseSearchViewCommand property.
Declaration
public static readonly BindableProperty CloseSearchViewCommandProperty
Field Value
BindableProperty
DocumentProperty
Identifies the Document property.
Declaration
public static readonly BindableProperty DocumentProperty
Field Value
BindableProperty
DoubleTappedCommandProperty
Identifies the DoubleTappedCommand property.
Declaration
public static readonly BindableProperty DoubleTappedCommandProperty
Field Value
BindableProperty
FitToWidthCommandProperty
Identifies the FitToWidthCommand property.
Declaration
public static readonly BindableProperty FitToWidthCommandProperty
Field Value
BindableProperty
LayoutModeProperty
Identifies the LayoutMode property.
Declaration
public static readonly BindableProperty LayoutModeProperty
Field Value
BindableProperty
MaxZoomLevelProperty
Identifies the MaxZoomLevel property.
Declaration
public static readonly BindableProperty MaxZoomLevelProperty
Field Value
BindableProperty
MinZoomLevelProperty
Identifies the MinZoomLevel property.
Declaration
public static readonly BindableProperty MinZoomLevelProperty
Field Value
BindableProperty
NavigateToNextPageCommandProperty
Identifies the NavigateToNextPageCommand property.
Declaration
public static readonly BindableProperty NavigateToNextPageCommandProperty
Field Value
BindableProperty
NavigateToNextSearchResultCommandProperty
Identifies the NavigateToNextSearchResultCommand property.
Declaration
public static readonly BindableProperty NavigateToNextSearchResultCommandProperty
Field Value
BindableProperty
NavigateToPageCommandProperty
Identifies the NavigateToPageCommand property.
Declaration
public static readonly BindableProperty NavigateToPageCommandProperty
Field Value
BindableProperty
NavigateToPreviousPageCommandProperty
Identifies the NavigateToPreviousPageCommand property.
Declaration
public static readonly BindableProperty NavigateToPreviousPageCommandProperty
Field Value
BindableProperty
NavigateToPreviousSearchResultCommandProperty
Identifies the NavigateToPreviousSearchResultCommand property.
Declaration
public static readonly BindableProperty NavigateToPreviousSearchResultCommandProperty
Field Value
BindableProperty
OpenSearchViewCommandProperty
Identifies the OpenSearchViewCommand property.
Declaration
public static readonly BindableProperty OpenSearchViewCommandProperty
Field Value
BindableProperty
PageSpacingProperty
Identifies the PageSpacing property.
Declaration
public static readonly BindableProperty PageSpacingProperty
Field Value
BindableProperty
SearchSettingsProperty
Identifies the SearchSettings property.
Declaration
public static readonly BindableProperty SearchSettingsProperty
Field Value
BindableProperty
SelectionSettingsProperty
Identifies the SelectionSettings property.
Declaration
public static readonly BindableProperty SelectionSettingsProperty
Field Value
BindableProperty
SourceExceptionTemplateProperty
Identifies the SourceExceptionTemplate property.
Declaration
public static readonly BindableProperty SourceExceptionTemplateProperty
Field Value
BindableProperty
SourceProperty
Identifies the Source property.
Declaration
public static readonly BindableProperty SourceProperty
Field Value
BindableProperty
ToggleLayoutModeCommandProperty
Identifies the ToggleLayoutModeCommand property.
Declaration
public static readonly BindableProperty ToggleLayoutModeCommandProperty
Field Value
BindableProperty
ViewportProperty
Identifies the Viewport property.
Declaration
public static readonly BindableProperty ViewportProperty
Field Value
BindableProperty
VisiblePagesCountProperty
Identifies the VisiblePagesCount property.
Declaration
public static readonly BindableProperty VisiblePagesCountProperty
Field Value
BindableProperty
VisiblePagesStartIndexProperty
Identifies the VisiblePagesStartIndex property.
Declaration
public static readonly BindableProperty VisiblePagesStartIndexProperty
Field Value
BindableProperty
ZoomInCommandProperty
Identifies the ZoomInCommand property.
Declaration
public static readonly BindableProperty ZoomInCommandProperty
Field Value
BindableProperty
ZoomLevelProperty
Identifies the ZoomLevel property.
Declaration
public static readonly BindableProperty ZoomLevelProperty
Field Value
BindableProperty
ZoomOutCommandProperty
Identifies the ZoomOutCommand property.
Declaration
public static readonly BindableProperty ZoomOutCommandProperty
Field Value
BindableProperty
Properties
BackgroundColor
Gets or sets the background color of the PDF viewer.
Declaration
public Color BackgroundColor { get; set; }
Property Value
Color
BusyIndicatorTemplate
Gets or sets the template for the busy indicator displayed during document loading.
Declaration
public DataTemplate BusyIndicatorTemplate { get; set; }
Property Value
DataTemplate
CloseSearchViewCommand
Gets or sets the ICommand which closes the PdfViewerSearchContentView.
Declaration
public ICommand CloseSearchViewCommand { get; set; }
Property Value
Document
Gets the currently loaded PDF document.
Declaration
public RadFixedDocument Document { get; }
Property Value
RadFixedDocument
DoubleTappedCommand
Gets or sets the command executed when the viewer is double-tapped. The parameter of this command is of type Point and it represents the relative position of the tap, i.e. values between 0 and 1 in the scope of the PdfViewer.
Declaration
public ICommand DoubleTappedCommand { get; set; }
Property Value
EnableHardwareAcceleration
Gets a value indicating whether the GPU should be used for rendering.
When set to true
, is used and rendering is performed using the GPU.
When set to false
, is used and rendering is performed using the CPU.
Declaration
public bool EnableHardwareAcceleration { get; set; }
Property Value
FitToWidthCommand
Gets or sets the command to fit the document to width.
Declaration
public ICommand FitToWidthCommand { get; set; }
Property Value
LayoutMode
Gets or sets the layout mode for displaying PDF pages.
MaxZoomLevel
Gets or sets the maximum zoom level allowed.
MinZoomLevel
Gets or sets the minimum zoom level allowed.
NavigateToNextPageCommand
Gets or sets the command to navigate to the next page.
Declaration
public ICommand NavigateToNextPageCommand { get; set; }
Property Value
NavigateToNextSearchResultCommand
Gets the ICommand executed when navigating to the next search result.
Declaration
public ICommand NavigateToNextSearchResultCommand { get; }
Property Value
NavigateToPageCommand
Gets or sets the command to navigate to a specific page. The parameter of this command is of type int and it represents the page index.
Declaration
public ICommand NavigateToPageCommand { get; set; }
Property Value
NavigateToPreviousPageCommand
Gets or sets the command to navigate to the previous page.
Declaration
public ICommand NavigateToPreviousPageCommand { get; set; }
Property Value
NavigateToPreviousSearchResultCommand
Gets the ICommand executed when navigating to the previous search result.
Declaration
public ICommand NavigateToPreviousSearchResultCommand { get; }
Property Value
OpenSearchViewCommand
Gets or sets the ICommand which opens the PdfViewerSearchContentView.
Declaration
public ICommand OpenSearchViewCommand { get; set; }
Property Value
PageSpacing
Gets or sets the spacing between pages in continuous layout mode.
SearchContentView
Gets the search content view for the PDF viewer.
Declaration
public PdfViewerSearchContentView SearchContentView { get; }
Property Value
SearchSettings
Gets or sets the settings for search functionality in the PDF viewer.
Declaration
public PdfViewerSearchSettings SearchSettings { get; set; }
Property Value
SelectionSettings
Gets or sets the settings for text selection in the PDF viewer.
Declaration
public PdfViewerSelectionSettings SelectionSettings { get; set; }
Property Value
Source
Gets or sets the document source for the PDF viewer.
Declaration
public DocumentSource Source { get; set; }
Property Value
SourceExceptionTemplate
Gets or sets the template for displaying source exceptions.
Declaration
public DataTemplate SourceExceptionTemplate { get; set; }
Property Value
DataTemplate
ToggleLayoutModeCommand
Gets or sets the command to toggle the layout mode.
Declaration
public ICommand ToggleLayoutModeCommand { get; set; }
Property Value
Viewport
Gets the current viewport rectangle of the document.
Declaration
public Rect Viewport { get; }
Property Value
Rect
VisiblePagesCount
Gets the number of visible pages.
VisiblePagesStartIndex
Gets the index of the first visible page.
ZoomInCommand
Gets or sets the command to zoom in the document.
ZoomLevel
Gets the current zoom level of the document.
ZoomOutCommand
Gets or sets the command to zoom out the document.
Methods
ChangeViewport(Rect)
Changes the Viewport property to the desired value.
Declaration
public void ChangeViewport(Rect viewport)
Parameters
viewport
Rect
The new value of the Viewport property.
NavigateToPage(int)
Navigates to the specified page index.
Declaration
public void NavigateToPage(int index)
Parameters
index
The zero-based index of the page to navigate to.
OnChildAdded(Element)
Called when a child element is added to the PDF viewer.
Declaration
protected override void OnChildAdded(Element child)
Parameters
child
Element
The child element that was added.
OnChildRemoved(Element, int)
Called when a child element is removed from the PDF viewer.
Declaration
protected override void OnChildRemoved(Element child, int oldLogicalIndex)
Parameters
child
Element
The child element that was removed.
oldLogicalIndex
The old logical index of the child element.
OnPropertyChanged(string)
Called when a property value changes.
Declaration
protected override void OnPropertyChanged(string propertyName = null)
Parameters
propertyName
The name of the property that changed.
ScrollIntoView(Rect)
Scrolls the control, so that the Rect parameter appears into the viewport. Zoom is performed if necessary. No change is performed if the Rect parameter is already into view.
Declaration
public void ScrollIntoView(Rect rect)
Parameters
rect
Rect
The Rect to scroll to.
ScrollIntoView(TextRange)
Scrolls the control, so that the TextRange parameter appears into the viewport. Zoom is performed if necessary. No change is performed if the TextRange parameter is already into view.
Declaration
public void ScrollIntoView(TextRange range)
Parameters
range
TextRange
The TextRange to scroll to.
ZoomToLevel(double)
Zooms the document to the specified zoom level.
Declaration
public void ZoomToLevel(double zoomLevel)
Parameters
zoomLevel
The zoom level to apply.
Events
LinkAnnotationTapped
Occurs when a link annotation is tapped within the PDF document.
Declaration
public event EventHandler<LinkAnnotationTappedEventArgs> LinkAnnotationTapped
Event Value
PageElementsLoaded
An event that is raised after the model elements of a page were loaded. Use this event to alter the page content before it is rendered. This event is raised on a background thread.
Declaration
public event EventHandler<PageElementsLoadedEventArgs> PageElementsLoaded
Event Value
SourceException
Occurs when an exception is raised during document loading or processing.
Declaration
public event EventHandler<SourceExceptionEventArgs> SourceException
Event Value
SourcePasswordNeeded
An event that is raised during document import if a password is needed. This event may be raised on a non-UI thread. The password can be provided in the event args.
Declaration
public event EventHandler<PasswordNeededEventArgs> SourcePasswordNeeded
Event Value
EventHandler<PasswordNeededEventArgs>