Share via


ImageSource.FromStream Method

Definition

Overloads

Name Description
FromStream(Func<Stream>)

Creates an ImageSource from a stream factory function.

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

Creates an ImageSource from an async stream factory function.

FromStream(Func<Stream>)

Source:
ImageSource.cs
Source:
ImageSource.cs
Source:
ImageSource.cs

Creates an ImageSource from a stream factory function.

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 function that returns a stream containing the image data.

Returns

A StreamImageSource for the 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
Source:
ImageSource.cs

Creates an ImageSource from an async stream factory function.

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 cancellable async factory function that returns a stream containing the image data.

Returns

A StreamImageSource for the stream.

Remarks

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

Applies to