Bagikan melalui


ImageSource.FromStream Method

Definition

Overloads

FromStream(Func<Stream>)

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

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

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

FromStream(Func<Stream>)

Returns a new StreamImageSource that calls stream and reads from the System.IO.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
System.Func<System.IO.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 System.IO.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
System.Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<System.IO.Stream>>

A factory method that returns a System.Threading.Tasks.Task`1 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