Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

ImageSource.FromStream Method

Definition

Namespace:
Microsoft.Maui.Controls
Assembly:
Microsoft.Maui.Controls.dll

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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
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
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


Feedback

Was this page helpful?