ILocalControlWrapper.GetGCHandleAsync(CancellationToken) Method

Definition

Returns the internal integer representation of a GCHandle object which references a user control .NET object.

public System.Threading.Tasks.Task<long> GetGCHandleAsync (System.Threading.CancellationToken cancellationToken);
abstract member GetGCHandleAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<int64>
Public Function GetGCHandleAsync (cancellationToken As CancellationToken) As Task(Of Long)

Parameters

cancellationToken
CancellationToken

Cancellation token for the async call.

Returns

The internal integer representation of a GCHandle object which references a user control .NET object. At this time, only user controls extending WPF FrameworkElement are supported.

Remarks

The party returning the GCHandle must prevent garbage collection of the user control until the ILocalControlWrapper is disposed.

Applies to