New to Telerik UI for .NET MAUIStart a free 30-day trial

Represents a PDF document source that loads documents from a stream.

Definition

Constructors

Initializes a new instance of the StreamDocumentSource class.

C#
public StreamDocumentSource()

Properties

Gets or sets the delegate responsible for returning a Stream for the RadFixedDocument. The stream is closed automatically.

C#
public Func<CancellationToken, Task<Stream>> Stream { get; set; }

Methods

Creates a RadFixedDocument to be used in the RadPdfViewer. The stream is not closed automatically.

C#
public void Import(Stream stream)
Parameters:streamStream

Creates a RadFixedDocument asynchronously to be used in the RadPdfViewer. The stream is not closed automatically.

C#
public void ImportAsync(Stream stream)
Parameters:streamStream

Operators

Performs an implicit conversion from Func<T, TResult> to StreamDocumentSource.

C#
public static implicit operator StreamDocumentSource(Func<CancellationToken, Task<Stream>> streamFunc)
Parameters:streamFuncFunc<CancellationToken, Task<Stream>>

The function that provides the stream.

Returns:

StreamDocumentSource

A new StreamDocumentSource instance with the specified stream function.

Performs an implicit conversion from Stream to StreamDocumentSource.

C#
public static implicit operator StreamDocumentSource(Stream stream)
Parameters:streamStream

The stream to convert.

Returns:

StreamDocumentSource

A new StreamDocumentSource instance that imports the specified stream.