編集

次の方法で共有


SKCanvasView Class

Definition

A view that can be drawn on using SkiaSharp drawing commands.

[Xamarin.Forms.RenderWith(typeof(SkiaSharp.Views.Forms.SKCanvasViewRenderer))]
public class SKCanvasView : Xamarin.Forms.View, SkiaSharp.Views.Forms.ISKCanvasViewController
Inheritance
SKCanvasView
Attributes
Implements

Constructors

SKCanvasView()

Creates a new instance of the SKCanvasView view.

Fields

EnableTouchEventsProperty

Implements the EnableTouchEvents property, and allows the SKCanvasView class to bind it to properties on other objects at run time.

IgnorePixelScalingProperty

Implements the IgnorePixelScaling property, and allows the SKCanvasView class to bind it to properties on other objects at run time.

Properties

CanvasSize

Gets the current canvas size.

EnableTouchEvents

Gets or sets a value indicating whether or not to enable touch events for this view.

IgnorePixelScaling

Gets or sets a value indicating whether the drawing canvas should be resized on high resolution displays.

Methods

InvalidateSurface()

Informs the canvas that it needs to redraw itself.

OnMeasure(Double, Double)

Method that is called when a layout measurement happens.

OnPaintSurface(SKPaintSurfaceEventArgs)

Implement this to draw on the canvas.

OnTouch(SKTouchEventArgs)

Implement this to handle touch events on the canvas.

Events

PaintSurface

Occurs when the the canvas needs to be redrawn.

Touch

Occurs when the the canvas received a touch event.

Explicit Interface Implementations

ISKCanvasViewController.GetCanvasSize

The event that is raised when the Xamarin.Forms view requests the size of the current SkiaSharp surface.

ISKCanvasViewController.OnPaintSurface(SKPaintSurfaceEventArgs)
ISKCanvasViewController.OnTouch(SKTouchEventArgs)
ISKCanvasViewController.SurfaceInvalidated

The event that is raised when the Xamarin.Forms view requests the native view be repainted.

Applies to