Edit

SKCanvasViewHandler Class

Definition

The .NET MAUI handler for ISKCanvasView that maps the cross-platform control to platform-specific implementations.

public class SKCanvasViewHandler : Microsoft.Maui.Handlers.ViewHandler<SkiaSharp.Views.Maui.ISKCanvasView,object>
Inheritance
SKCanvasViewHandler

Remarks

This handler creates and manages the platform-specific canvas view (Android SKCanvasView, iOS SKCanvasView, or Windows SKXamlCanvas) and handles property synchronization between the cross-platform control and native view.

Constructors

Name Description
SKCanvasViewHandler()

Initializes a new instance of the SKCanvasViewHandler class with default mappers.

SKCanvasViewHandler(PropertyMapper, CommandMapper)

Initializes a new instance of the SKCanvasViewHandler class with custom mappers.

Fields

Name Description
SKCanvasViewCommandMapper

The command mapper that maps cross-platform commands to handler methods.

SKCanvasViewMapper

The property mapper that maps cross-platform properties to handler methods.

Methods

Name Description
CreatePlatformView()

Creates the platform-specific view for the current platform.

MapEnableTouchEvents(SKCanvasViewHandler, ISKCanvasView)

Maps the EnableTouchEvents property to the platform view.

MapIgnorePixelScaling(SKCanvasViewHandler, ISKCanvasView)

Maps the IgnorePixelScaling property to the platform view.

OnInvalidateSurface(SKCanvasViewHandler, ISKCanvasView, Object)

Handles the InvalidateSurface() command to trigger a redraw.

Applies to