CaptureSnapshotAsync(CancellationToken) Method

Definition

Assembly NativeWebView.dll

Captures the visible viewport of an initialized embedded native WebView as PNG data.

public Task<NativeWebViewSnapshot?> CaptureSnapshotAsync(CancellationToken cancellationToken = default(CancellationToken))

Parameters

cancellationToken
CancellationToken

Returns

Remarks

This operation is best-effort and returns null when the platform does not support embedded snapshots, the control is uninitialized, or a native capture is temporarily unavailable or fails. Cancellation is propagated to the caller.