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

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

public static Xamarin.Forms.ImageSource FromStream (Func<System.IO.Stream> stream);
static member FromStream : Func<System.IO.Stream> -> Xamarin.Forms.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 must return a new stream on every invocation.

Applies to

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

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

public static Xamarin.Forms.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>> -> Xamarin.Forms.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 must return a new stream on every invocation.

Applies to