Edit

SKGLElement Class

Definition

A WPF element that uses OpenGL for hardware-accelerated SkiaSharp rendering.

public class SKGLElement : OpenTK.Wpf.GLWpfControl, IDisposable
Inheritance
OpenTK.Wpf.GLWpfControl
SKGLElement
Implements

Constructors

Name Description
SKGLElement()

Initializes a new instance of the SKGLElement class.

Properties

Name Description
CanvasSize

Gets the current canvas size in pixels.

GRContext

Gets the GPU context used for rendering.

Methods

Name Description
Dispose()

Releases all resources used by the element.

Dispose(Boolean)

Releases the unmanaged resources used by the element and optionally releases the managed resources.

OnPaint(TimeSpan)

Called when the control needs to be painted.

OnPaintSurface(SKPaintGLSurfaceEventArgs)

Raises the PaintSurface event.

OnRender(DrawingContext)

Participates in rendering operations when overridden in a derived class.

Events

Name Description
PaintSurface

Occurs when the surface needs to be redrawn.

Applies to