ImageSource.FromStream Method
Definition
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
FromStream(Func<Stream>) |
Returns a new StreamImageSource that calls |
FromStream(Func<CancellationToken,Task<Stream>>) |
Returns a new StreamImageSource that calls |
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.