ILocalControlWrapper.GetGCHandleAsync(CancellationToken) 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.
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.