none
[UWP][XBOX] How to capture screenshot on XBOX ONE for UWP app?

Answers

  • Hello Exilerrr,

    I don't have a test device so I'm not so sure whether XBOX one provide a embedded function to capture screenshot of a UWP app with any buttons.

    But we can programmatically capture screenshot in our UWP app itself.

    For example, please see the following class RenderTargetBitmap class

    And the following code:

    private async void SaveImageSource_Click(object sender, RoutedEventArgs e) 
    {                        
    ...
        RenderTargetBitmap renderTargetBitmap = new RenderTargetBitmap(); 
        await renderTargetBitmap.RenderAsync(RenderedGrid, width, height); 
        RenderedImage.Source = renderTargetBitmap; 
    }

    Also this sample shows how we can use code to get the app's screenshot(Please see scenario 2): https://code.msdn.microsoft.com/windowsapps/XAML-render-to-bitmap-dd4f549f

    If you cannot find related function in XBOX console please consider use my above class.

    By the way, do you mind to test this:

    http://support.xbox.com/en-US/games/game-setup/capture-screenshots

    Which is saying using this "The Xbox captures the screenshot when you double-tap the Xbox button . Pressing the Y button  saves the image." Currently I don't have a device so please give this a try.

    Best regards,

    Barry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Thursday, November 03, 2016 8:44 AM
    Moderator

All replies

  • Hello Exilerrr,

    I don't have a test device so I'm not so sure whether XBOX one provide a embedded function to capture screenshot of a UWP app with any buttons.

    But we can programmatically capture screenshot in our UWP app itself.

    For example, please see the following class RenderTargetBitmap class

    And the following code:

    private async void SaveImageSource_Click(object sender, RoutedEventArgs e) 
    {                        
    ...
        RenderTargetBitmap renderTargetBitmap = new RenderTargetBitmap(); 
        await renderTargetBitmap.RenderAsync(RenderedGrid, width, height); 
        RenderedImage.Source = renderTargetBitmap; 
    }

    Also this sample shows how we can use code to get the app's screenshot(Please see scenario 2): https://code.msdn.microsoft.com/windowsapps/XAML-render-to-bitmap-dd4f549f

    If you cannot find related function in XBOX console please consider use my above class.

    By the way, do you mind to test this:

    http://support.xbox.com/en-US/games/game-setup/capture-screenshots

    Which is saying using this "The Xbox captures the screenshot when you double-tap the Xbox button . Pressing the Y button  saves the image." Currently I don't have a device so please give this a try.

    Best regards,

    Barry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Thursday, November 03, 2016 8:44 AM
    Moderator
  • Unfortunately for UWP applications the "double-tap" technique for capturing screenshots doesn't work. I would also advise against writing code for extracting a screenshot of your currently running application as you'll then need to worry about getting the screenshot off the Xbox.

    A much better alternative is to make use of the device portal that can be setup for the console when it's switched to dev mode. For full instructions, see http://nicksnettravels.builttoroam.com/post/2017/02/23/Screenshots-for-a-UWP-Xbox-App.aspx

     

    Nick Randolph ~ Built to Roam


    Thursday, February 23, 2017 2:59 AM