ClassStreamDocumentSource
Represents a PDF document source that loads documents from a stream.
Definition
Namespace:Telerik.Maui.Controls.PdfViewer
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class StreamDocumentSource : DocumentSource, INotifyPropertyChanged
Inheritance: objectNotifyPropertyChangedBaseDocumentSourceStreamDocumentSource
Implements:
Inherited Members
Constructors
StreamDocumentSource()
Initializes a new instance of the StreamDocumentSource class.
Declaration
public StreamDocumentSource()
Properties
Stream
Gets or sets the delegate responsible for returning a Stream for the RadFixedDocument. The stream is closed automatically.
Declaration
public Func<CancellationToken, Task<Stream>> Stream { get; set; }
Property Value
Methods
Import(Stream)
Creates a RadFixedDocument to be used in the RadPdfViewer. The stream is not closed automatically.
ImportAsync(Stream)
Creates a RadFixedDocument asynchronously to be used in the RadPdfViewer. The stream is not closed automatically.
Operators
implicit operator StreamDocumentSource(Func<CancellationToken, Task<Stream>>)
Performs an implicit conversion from Func<T, TResult> to StreamDocumentSource.
Declaration
public static implicit operator StreamDocumentSource(Func<CancellationToken, Task<Stream>> streamFunc)
Parameters
streamFunc
Func<CancellationToken, Task<Stream>>
The function that provides the stream.
Returns
A new StreamDocumentSource instance with the specified stream function.
implicit operator StreamDocumentSource(Stream)
Performs an implicit conversion from Stream to StreamDocumentSource.
Declaration
public static implicit operator StreamDocumentSource(Stream stream)
Parameters
stream
The stream to convert.
Returns
A new StreamDocumentSource instance that imports the specified stream.