Compositor.CreateSurfaceBrush Compositor.CreateSurfaceBrush Compositor.CreateSurfaceBrush Compositor.CreateSurfaceBrush Method

Definition

Overloads

CreateSurfaceBrush() CreateSurfaceBrush() CreateSurfaceBrush() CreateSurfaceBrush()

Creates an instance of CompositionSurfaceBrush.

CreateSurfaceBrush(ICompositionSurface) CreateSurfaceBrush(ICompositionSurface) CreateSurfaceBrush(ICompositionSurface) CreateSurfaceBrush(ICompositionSurface)

Creates an instance of CompositionSurfaceBrush using the specified composition surface.

CreateSurfaceBrush() CreateSurfaceBrush() CreateSurfaceBrush() CreateSurfaceBrush()

Creates an instance of CompositionSurfaceBrush.

public : CompositionSurfaceBrush CreateSurfaceBrush()
CompositionSurfaceBrush CreateSurfaceBrush() const;
public CompositionSurfaceBrush CreateSurfaceBrush()
Public Function CreateSurfaceBrush() As CompositionSurfaceBrush

Returns

Additional features and requirements

Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

Examples


SpriteVisual visual= compositor.CreateSpriteVisual();

var surface = graphicsDevice.CreateDrawingSurface(new Size(300, 50), 
                       Windows.Graphics.DirectX.DirectXPixelFormat.B8G8R8A8UIntNormalized, 
                       CompositionAlphaMode.Ignore); 

var surfaceBrush = _compositor.CreateSurfaceBrush(surface);
surfaceBrush.HorizontalAlignmentRatio = 0.0;
surfaceBrush.VerticalAlignmentRatio= 0.0;
surfaceBrush.Stretch = CompositionStretch.None;

visual.Brush = surfaceBrush;
          
See also

CreateSurfaceBrush(ICompositionSurface) CreateSurfaceBrush(ICompositionSurface) CreateSurfaceBrush(ICompositionSurface) CreateSurfaceBrush(ICompositionSurface)

Creates an instance of CompositionSurfaceBrush using the specified composition surface.

public : CompositionSurfaceBrush CreateSurfaceBrush(ICompositionSurface surface)
CompositionSurfaceBrush CreateSurfaceBrush(ICompositionSurface surface) const;
public CompositionSurfaceBrush CreateSurfaceBrush(ICompositionSurface surface)
Public Function CreateSurfaceBrush(surface As ICompositionSurface) As CompositionSurfaceBrush

Parameters

surface
ICompositionSurface ICompositionSurface

The composition surface to associate with the CompositionSurfaceBrush.

Returns

Additional features and requirements

Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)
See also