Search code examples
uwpuwp-xamlxbox

Change visibility of UWP application while recording


I am trying to create an UWP Xaml application that has similar properties as Xbox Bar. I need my application to be not visible when recorded and rendered using screen recorder or captured using screen capture, but be running in the foreground.

I searched for similar application or source code, but unfortunately could not find and reference.

IDE - Visual Studio 2019


Solution

  • Change visibility of UWP application while recording

    Sure, derive the testing, you could minimize recording app after recoding start. And here is blog you could refer to make record app. For minimize the app you could place the following code in line 70 .

    await Task.Delay(1000).ContinueWith(async (s) =>
                    {
                        IList<AppDiagnosticInfo> infos = await AppDiagnosticInfo.RequestInfoForAppAsync();
                        IList<AppResourceGroupInfo> resourceInfos = infos[0].GetResourceGroups();
                        await resourceInfos[0].StartSuspendAsync();
                    });