Edit

SKSwapChainPanel Class

Definition

A XAML control that uses hardware-accelerated rendering via ANGLE to draw using SkiaSharp.

public class SKSwapChainPanel : SkiaSharp.Views.Windows.AngleSwapChainPanel
Inheritance
Microsoft.UI.Xaml.Controls.SwapChainPanel
SKSwapChainPanel

Remarks

This control uses an OpenGL ES context via ANGLE to provide GPU-accelerated SkiaSharp drawing. It inherits from AngleSwapChainPanel and provides SkiaSharp-specific rendering functionality.

Constructors

Name Description
SKSwapChainPanel()

Initializes a new instance of the SKSwapChainPanel class.

Properties

Name Description
CanvasSize

Gets the current canvas size in pixels.

ContentsScale

Gets the scale factor applied to the contents of the panel.

(Inherited from AngleSwapChainPanel)
DrawInBackground

Gets or sets a value indicating whether rendering should occur on a background thread.

(Inherited from AngleSwapChainPanel)
EnableRenderLoop

Gets or sets a value indicating whether a continuous render loop is enabled.

(Inherited from AngleSwapChainPanel)
GRContext

Gets the GPU context used for rendering.

Methods

Name Description
Invalidate()

Requests that the panel render a new frame.

(Inherited from AngleSwapChainPanel)
OnDestroyingContext()

Called when the OpenGL ES context is being destroyed.

OnPaintSurface(SKPaintGLSurfaceEventArgs)

Raises the PaintSurface event.

OnRenderFrame(Rect)

Called when a frame should be rendered.

Events

Name Description
PaintSurface

Occurs when the surface needs to be repainted.

Applies to