Make your widget transparent

As of 5.3.2005.12001.0 Game Bar supports transparency in widgets. In prior versions of Game Bar the SDK would draw a background for every widget, making it impossible for them to set their own transparency. Going forward this background has been removed, freeing widgets to decide their own opacity levels.

To facilitate this Game Bar includes a new property which indicates the user's preference for opacity. Widgets should respect this value and and adjust their own values to match.

Implementation

Implementation will vary based on your widget implementation. In general you will need to subscribe to the RequestedOpacityChanged event, and update the necessary elements as appropriate.

The opacity will change based on the current state of the UI. As an example when Game Bar is open and in the foreground this opacity will always be 100. When Game Bar switches to the pinned state all widgets will receive the correct opacity value as defined by the user.

protected override void OnNavigatedTo(NavigationEventArgs e)
{
    // you will need access to the XboxGameBarWidget, in this case it was passed as a parameter when navigating to the widget page, your implementation may differ.
    widget = e.Parameter as XboxGameBarWidget;

    // subscribe for RequestedOpacityChanged events
    widget.RequestedOpacityChanged += Widget_RequestedOpacityChanged;
}

private async void Widget_RequestedOpacityChanged(XboxGameBarWidget sender, object args)
{
    // be sure to dispatch to the correct UI thread for this widget, Game Bar events are not guaranteed to come in on the same thread.
    await RequestedOpacityTextBlock.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
    {
        // adjust the opacity of your background as appropriate
        BackgroundGrid.Opacity = widget.RequestedOpacity;
    });
}