public static void SetWindow(this GraphicsCapturePicker picker, IntPtr hwnd) { var interop = picker.As <IInitializeWithWindow>(); interop.Initialize(hwnd); }