How can I enable ScreenRecording (Video) of my UWP by the XBox GameBar App? Now it's only possible if I build it with VisualStudio. If I install it out the Microsoft-Store it is not possible.
How can I enable ScreenRecording (Video) of my UWP by the XBox GameBar App? Now it's only possible if I build it with VisualStudio. If I install it out the Microsoft-Store it is not possible.
Hello,
Welcome to Microsoft Q&A!
How can I enable ScreenRecording (Video) of my UWP by the XBox GameBar App?
Yep, we could reproduce this problem, and it looks the game bar can't get your app's window that install from store, and currently there is workaround that use screen capture api your app to replace the game bar.
Thank you.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

I only want to record it by the XBox GameBar App.
Please try use InjectKeyboard for your app to simulate press Win +G to call game bar.
private async void Button_Click(object sender, RoutedEventArgs e)
{
InputInjector inputInjector = InputInjector.TryCreate();
var win = new InjectedInputKeyboardInfo();
win.VirtualKey = (ushort)(VirtualKey.LeftWindows);
win.KeyOptions = InjectedInputKeyOptions.None;
var g = new InjectedInputKeyboardInfo();
g.VirtualKey = (ushort)(VirtualKey.G);
g.KeyOptions = InjectedInputKeyOptions.None;
inputInjector.InjectKeyboardInput(new[] { win, g });
await Task.Delay(1000);
var rwin = new InjectedInputKeyboardInfo();
rwin.VirtualKey = (ushort)(VirtualKey.LeftWindows);
rwin.KeyOptions = InjectedInputKeyOptions.KeyUp;
var rg = new InjectedInputKeyboardInfo();
rg.VirtualKey = (ushort)(VirtualKey.G);
rg.KeyOptions = InjectedInputKeyOptions.KeyUp;
inputInjector.InjectKeyboardInput(new[] { rwin, rg });
}
Add capability
<Package>
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="rescap"
<Capabilities>
<rescap:Capability Name="inputInjectionBrokered" />
My problem is not to start XBox GameBar. If I start my App its not possible to record it. I think there' s missing a capability perhaps. In other UWPs like MyTube or Calculator it works without problems.
Thank you
4 people are following this question.