Udostępnij za pośrednictwem


ImageSource.FromStream Method

Definition

Overloads

FromStream(Func<Stream>)

Returns a new StreamImageSource that calls stream and reads from the Stream it returns.

FromStream(Func<CancellationToken,Task<Stream>>)

Returns a new StreamImageSource that calls stream and reads from the Stream it returns.

FromStream(Func<Stream>)

Source:
ImageSource.cs
Source:
ImageSource.cs

Returns a new StreamImageSource that calls stream and reads from the Stream it returns.

public:
 static Microsoft::Maui::Controls::ImageSource ^ FromStream(Func<System::IO::Stream ^> ^ stream);
public static Microsoft.Maui.Controls.ImageSource FromStream (Func<System.IO.Stream> stream);
static member FromStream : Func<System.IO.Stream> -> Microsoft.Maui.Controls.ImageSource
Public Shared Function FromStream (stream As Func(Of Stream)) As ImageSource

Parameters

stream
Func<Stream>

A factory method that returns a new stream that supplies image data.

Returns

A new StreamImageSource with the data returned by stream.

Remarks

The delegate provided to stream must return a new stream on every invocation.

Applies to

FromStream(Func<CancellationToken,Task<Stream>>)

Source:
ImageSource.cs
Source:
ImageSource.cs

Returns a new StreamImageSource that calls stream and reads from the Stream it returns.

public:
 static Microsoft::Maui::Controls::ImageSource ^ FromStream(Func<System::Threading::CancellationToken, System::Threading::Tasks::Task<System::IO::Stream ^> ^> ^ stream);
public static Microsoft.Maui.Controls.ImageSource FromStream (Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<System.IO.Stream>> stream);
static member FromStream : Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<System.IO.Stream>> -> Microsoft.Maui.Controls.ImageSource
Public Shared Function FromStream (stream As Func(Of CancellationToken, Task(Of Stream))) As ImageSource

Parameters

stream
Func<CancellationToken,Task<Stream>>

A factory method that returns a Task<TResult> that returns a new stream that supplies image data and supports cancellation.

Returns

A new StreamImageSource with the data returned by stream.

Remarks

The delegate provided to stream must return a new stream on every invocation.

Applies to