ICompositionSurfaceFacade Interface

Definition

Represents a placeholder for a composition surface that can be used like a real composition surface.

public interface class ICompositionSurfaceFacade
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 786432)]
/// [Windows.Foundation.Metadata.Guid(3759547080, 9010, 21959, 136, 104, 167, 49, 44, 92, 34, 157)]
struct ICompositionSurfaceFacade
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 786432)]
[Windows.Foundation.Metadata.Guid(3759547080, 9010, 21959, 136, 104, 167, 49, 44, 92, 34, 157)]
public interface ICompositionSurfaceFacade
Public Interface ICompositionSurfaceFacade
Attributes

Windows requirements

Device family
Windows 10, version 2104 (introduced in 10.0.20348.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v12.0)

Remarks

The surface façade interface lets you create an object that can be assigned to the Surface property of a CompositionSurfaceBrush object, or passed as the surface argument to the Compositor.CreateSurfaceBrush method. An application or framework object that implements this interface must also implement the ICompositionSurface interface, so that it can be assigned to the Surface property of a brush.

The CompositionSurfaceBrush queries for ICompositionSurfaceFacade and calls the GetRealSurface method only once at property assignment time (which is at creation time, in the case of CreateSurfaceBrush) to retrieve the real ICompositionSurface object from the façade. The real object cannot in turn also be a façade; it must be a real object, or the assignment (or creation) method fails with E_INVALIDARG. The façade and the real surface are then referenced by the brush. In that way, the façade object is kept alive by the visual tree in the same way as a real surface.

Methods

GetRealSurface()

Retrieves the ICompositionSurface object represented by this façade.

Applies to

See also