ChromiumWebBrowserCaptureScreenshotAsync Method  | 
Version 106.0.290 
            Capture page screenshot.
            
 
    Namespace: 
   CefSharp.WinForms
    Assembly:
   CefSharp.WinForms (in CefSharp.WinForms.dll) Version: 106.0.290.0 (106.0.290.0)
Syntaxpublic Task<byte[]> CaptureScreenshotAsync(
	CaptureScreenshotFormat format = CaptureScreenshotFormat.Png,
	int? quality = null,
	Viewport viewPort = null,
	bool fromSurface = true,
	bool captureBeyondViewport = false
)
public:
Task<array<unsigned char>^>^ CaptureScreenshotAsync(
	CaptureScreenshotFormat format = CaptureScreenshotFormat::Png, 
	Nullable<int> quality = nullptr, 
	Viewport^ viewPort = nullptr, 
	bool fromSurface = true, 
	bool captureBeyondViewport = false
)
Parameters
- format (Optional)
 - Type: CefSharp.DevTools.PageCaptureScreenshotFormat
Image compression format (defaults to png). - quality (Optional)
 - Type: SystemNullableInt32
Compression quality from range [0..100] (jpeg only). - viewPort (Optional)
 - Type: CefSharp.DevTools.PageViewport
Capture the screenshot of a given region only. - fromSurface (Optional)
 - Type: SystemBoolean
Capture the screenshot from the surface, rather than the view. Defaults to true. - captureBeyondViewport (Optional)
 - Type: SystemBoolean
Capture the screenshot beyond the viewport. Defaults to false. 
Return Value
Type: 
TaskByteA task that can be awaited to obtain the screenshot as a byte[].
See Also