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 Stream it returns.
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
Returns
A new StreamImageSource with the data returned by stream
.
Remarks
The delegate provided to stream
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 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 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 stream
must return a new stream on every invocation.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für