Skip to content

How to use GraphicsCapturePicker in WinUI 3? Error when invoking. #1723

Answered by bitbound
bitbound asked this question in Q&A
Discussion options

You must be logged in to vote

Nevermind. I figured it out! :) Here's the interop calls that need to be made:

            var hwnd = WindowNative.GetWindowHandle(_mainWindow);
            var picker = new GraphicsCapturePicker();
            InitializeWithWindow.Initialize(picker, hwnd);
            var item = await picker.PickSingleItemAsync();

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@OxOld
Comment options

@codedocu
Comment options

@Fygadi
Comment options

Answer selected by bitbound
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants