ReadableBitmapDataExtensionsEndToWriteableBitmap Method

Waits for the pending asynchronous operation started by any of the BeginToWriteableBitmap methods to complete. In .NET Framework 4.0 and above you can use the ToWriteableBitmapAsync methods instead.

Definition

Namespace: KGySoft.Drawing.Wpf
Assembly: KGySoft.Drawing.Wpf (in KGySoft.Drawing.Wpf.dll) Version: 10.0.0-rc.1
C#
public static WriteableBitmap? EndToWriteableBitmap(
	this IAsyncResult asyncResult
)

Parameters

asyncResult  IAsyncResult
The reference to the pending asynchronous request to finish.

Return Value

WriteableBitmap
A WriteableBitmap instance that is the result of the operation, or , if the operation was canceled and the ThrowIfCanceledproperty of the asyncConfig parameter was .

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IAsyncResult. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ArgumentNullExceptionasyncResult is , or was not returned by a BeginToWriteableBitmap overload.
InvalidOperationExceptionA deadlock has been detected while attempting to create the result.

See Also