ISystemBackdropController Interface

Definition

Provides methods to connect a system backdrop controller to a window.

public interface class ISystemBackdropController : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.WindowsAppSDKContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(1446172524, 2932, 23378, 170, 51, 128, 38, 32, 104, 174, 178)]
struct ISystemBackdropController : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.WindowsAppSDKContract), 65536)]
[Windows.Foundation.Metadata.Guid(1446172524, 2932, 23378, 170, 51, 128, 38, 32, 104, 174, 178)]
public interface ISystemBackdropController : System.IDisposable
Public Interface ISystemBackdropController
Implements IDisposable
Derived
Attributes
Implements

Examples

This example shows how to draw the new Windows 11 Mica material in a Win32 app window using C++/WinRT.

bool SetupBackdrop(winrt::Microsoft::UI::WindowId windowId, winrt::Windows::UI::Composition::CompositionTarget compositionTarget)
{
    winrt::Microsoft::UI::Composition::SystemBackdrops::MicaController micaController = winrt::MicaController();
    return micaController.SetTarget(windowId, compositionTarget);
}

Remarks

A system backdrop is essentially a CompositionBrush that defines a UI material such as Acrylic or Mica. This brush is drawn by the system compositor. A system backdrop controller is an object that encapsulates both the rendering of the system backdrop material as well as the handling of system policy for the given material. Each material has its own controller.

You can draw a material at the back of your content by creating the corresponding ISystemBackdropController and providing your window and CompositionTarget to the controller's SetTarget method. If SetTarget succeeds and returns true, the controller takes care of all material handling, including fallback rendering and all system policies. If SetTarget fails and returns false, it means the controller was unable to set up the desired material as a system backdrop, and no changes have been made to the CompositionTarget.

Materials are drawn using the Windows.UI.Composition APIs, so a CompositionTarget is required on which the material will be drawn at the very back behind the rest of the app content. Any app content that has transparency will show through to the chosen material.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

SetTarget(CoreWindow, CompositionTarget)

Connects a system backdrop controller to the specified CoreWindow.

SetTarget(WindowId, CompositionTarget)

Connects a system backdrop controller to an HWND or AppWindow with the specified WindowId.

Applies to