ClassDocumentSource
Represents an abstract base class for document sources that can be used to load PDF documents in a RadPdfViewer.
Definition
Namespace:Telerik.Maui.Controls.PdfViewer
Assembly:Telerik.Maui.Controls.dll
Syntax:
public abstract class DocumentSource : NotifyPropertyChangedBase, INotifyPropertyChanged
Inheritance: objectNotifyPropertyChangedBaseDocumentSource
Derived Classes:
Implements:
Inherited Members
Constructors
DocumentSource()
Initializes a new instance of the DocumentSource class.
Declaration
public DocumentSource()
Properties
Events
PasswordNeeded
Occurs when a password is needed to open a password-protected PDF document.
Declaration
public event EventHandler<PasswordNeededEventArgs> PasswordNeeded
Event Value
EventHandler<PasswordNeededEventArgs>
Operators
implicit operator DocumentSource(Func<CancellationToken, Task<Stream>>)
Implicitly converts a stream function to a DocumentSource.
Declaration
public static implicit operator DocumentSource(Func<CancellationToken, Task<Stream>> streamFunc)
Parameters
streamFunc
Func<CancellationToken, Task<Stream>>
The function that provides a stream for the document.
Returns
A StreamDocumentSource instance.
implicit operator DocumentSource(RadFixedDocument)
Implicitly converts a RadFixedDocument to a DocumentSource.
Declaration
public static implicit operator DocumentSource(RadFixedDocument document)
Parameters
document
RadFixedDocument
The document to convert.
Returns
A FixedDocumentSource instance.
implicit operator DocumentSource(Uri)
Implicitly converts a Uri to a DocumentSource.
Declaration
public static implicit operator DocumentSource(Uri uri)
Parameters
uri
Uri
The URI to convert.
Returns
A UriDocumentSource instance.
implicit operator DocumentSource(byte[])
Implicitly converts a byte array to a DocumentSource.
Declaration
public static implicit operator DocumentSource(byte[] bytes)
Parameters
bytes
byte[]
The byte array containing the document data.
Returns
A ByteArrayDocumentSource instance.
implicit operator DocumentSource(string)
Implicitly converts a string to a DocumentSource.
Declaration
public static implicit operator DocumentSource(string source)
Parameters
source
The string representing a file path or URI.
Returns
A UriDocumentSource or FileDocumentSource instance depending on the string format.