Condividi tramite


Compositor.CreateSurfaceBrush Metodo

Definizione

Overload

CreateSurfaceBrush()

Crea un'istanza di CompositionSurfaceBrush.

CreateSurfaceBrush(ICompositionSurface)

Crea un'istanza di CompositionSurfaceBrush usando l'area di composizione specificata.

CreateSurfaceBrush()

Crea un'istanza di CompositionSurfaceBrush.

public:
 virtual CompositionSurfaceBrush ^ CreateSurfaceBrush() = CreateSurfaceBrush;
/// [Windows.Foundation.Metadata.Overload("CreateSurfaceBrush")]
CompositionSurfaceBrush CreateSurfaceBrush();
[Windows.Foundation.Metadata.Overload("CreateSurfaceBrush")]
public CompositionSurfaceBrush CreateSurfaceBrush();
function createSurfaceBrush()
Public Function CreateSurfaceBrush () As CompositionSurfaceBrush

Restituisce

Restituisce l'oggetto CompositionSurfaceBrush creato.

Attributi

Requisiti Windows

Famiglia di dispositivi
Windows 10 (è stato introdotto in 10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (è stato introdotto in v2.0)

Esempio

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;

Vedi anche

Si applica a

CreateSurfaceBrush(ICompositionSurface)

Crea un'istanza di CompositionSurfaceBrush usando l'area di composizione specificata.

public:
 virtual CompositionSurfaceBrush ^ CreateSurfaceBrush(ICompositionSurface ^ surface) = CreateSurfaceBrush;
/// [Windows.Foundation.Metadata.Overload("CreateSurfaceBrushWithSurface")]
CompositionSurfaceBrush CreateSurfaceBrush(ICompositionSurface const& surface);
[Windows.Foundation.Metadata.Overload("CreateSurfaceBrushWithSurface")]
public CompositionSurfaceBrush CreateSurfaceBrush(ICompositionSurface surface);
function createSurfaceBrush(surface)
Public Function CreateSurfaceBrush (surface As ICompositionSurface) As CompositionSurfaceBrush

Parametri

surface
ICompositionSurface

Superficie di composizione da associare a CompositionSurfaceBrush.

Restituisce

Restituisce l'oggetto CompositionSurfaceBrush creato.

Attributi

Requisiti Windows

Famiglia di dispositivi
Windows 10 (è stato introdotto in 10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (è stato introdotto in v2.0)

Vedi anche

Si applica a