Skip to content

Latest commit

 

History

History
36 lines (19 loc) · 1.3 KB

graphicscaptureitem_trycreatefromwindowid_546590804.md

File metadata and controls

36 lines (19 loc) · 1.3 KB
-api-id -api-type
M:Windows.Graphics.Capture.GraphicsCaptureItem.TryCreateFromWindowId(Windows.UI.WindowId)
winrt method

Windows.Graphics.Capture.GraphicsCaptureItem.TryCreateFromWindowId(Windows.UI.WindowId)

-description

Attempts to create a GraphicsCaptureItem that represents the window with the specified WindowId.

-parameters

-param windowId

The WindowId with which to construct the GraphicsCaptureItem.

-returns

Upon success, returns a GraphicsCaptureItem that represents the given window.

-remarks

Before attempting to create a GraphicsCaptureItem with this method, you must call GraphicsCaptureAccess.RequestAccessAsync, passing in a value of GraphicsCaptureAccessKind.Programmatic. To call RequestAccessAsync with GraphicsCaptureAccessKind.Programmatic, you must declare the graphicsCaptureProgrammatic capability in your app's package manifest. For more information, see App capability declarations.

-see-also

-examples