Edit

Share via


ISKCanvasView Interface

Definition

Defines the interface for a software-rendered SkiaSharp canvas view in .NET MAUI.

public interface ISKCanvasView : Microsoft.Maui.IView
Derived
Implements

Remarks

This interface is implemented by SKCanvasView and used by platform-specific handlers to communicate between the cross-platform view and native platform views.

Properties

Name Description
CanvasSize

Gets the current size of the canvas in pixels.

EnableTouchEvents

Gets a value indicating whether touch events are enabled for this view.

IgnorePixelScaling

Gets a value indicating whether the drawing canvas should ignore the physical pixel density.

Methods

Name Description
InvalidateSurface()

Invalidates the canvas surface, causing a redraw.

OnCanvasSizeChanged(SKSizeI)

Called by the handler when the canvas size changes.

OnPaintSurface(SKPaintSurfaceEventArgs)

Called by the handler when the surface needs to be painted.

OnTouch(SKTouchEventArgs)

Called by the handler when a touch event occurs.

Applies to