Click or drag to resize
CanvasDrawingSessionCreateLayer Method (ICanvasBrush, Rect)
Creates a layer that will clip its contents to a rectangle, and blend using the specified opacity mask brush.

Namespace:  Microsoft.Graphics.Canvas
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public CanvasActiveLayer CreateLayer(
	ICanvasBrush opacityBrush,
	Rect clipRectangle
)

Parameters

opacityBrush
Type: Microsoft.Graphics.Canvas.BrushesICanvasBrush
clipRectangle
Type: Windows.FoundationRect

Return Value

Type: CanvasActiveLayer
Remarks

The layer affects all drawing until the returned CanvasActiveLayer object is closed. In C# this is typically done with a 'using' statement, or in C++/CX the 'delete' keyword.

For more information about layers, see CanvasActiveLayer.

See Also