SKCanvasView Constructors

Definition

Overloads

SKCanvasView(Context)

Simple constructor to use when creating a SKCanvasView from code.

SKCanvasView(Context, IAttributeSet)

Constructor that is called when inflating a SKCanvasView from XML.

SKCanvasView(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

SKCanvasView(Context, IAttributeSet, Int32)

Perform inflation from XML and apply a class-specific base style from a theme attribute.

SKCanvasView(Context)

Simple constructor to use when creating a SKCanvasView from code.

C#
public SKCanvasView (Android.Content.Context context);

Parameters

context
Context

The Context the view is running in, through which it can access the current theme, resources, etc.

Applies to

SkiaSharp Views 2.88.x och andra versioner
Produkt Versioner
SkiaSharp Views 1.60.x, 1.68.x, 2.80.x, 2.88.x

SKCanvasView(Context, IAttributeSet)

Constructor that is called when inflating a SKCanvasView from XML.

C#
public SKCanvasView (Android.Content.Context context, Android.Util.IAttributeSet attrs);

Parameters

context
Context

The Context the view is running in, through which it can access the current theme, resources, etc.

attrs
IAttributeSet

The attributes of the XML tag that is inflating the view.

Applies to

SkiaSharp Views 2.88.x och andra versioner
Produkt Versioner
SkiaSharp Views 1.60.x, 1.68.x, 2.80.x, 2.88.x

SKCanvasView(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

C#
protected SKCanvasView (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);

Parameters

javaReference
IntPtr

A IntPtr a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnership indicating how to handle Java reference.

Applies to

SkiaSharp Views 2.88.x och andra versioner
Produkt Versioner
SkiaSharp Views 1.60.x, 1.68.x, 2.80.x, 2.88.x

SKCanvasView(Context, IAttributeSet, Int32)

Perform inflation from XML and apply a class-specific base style from a theme attribute.

C#
public SKCanvasView (Android.Content.Context context, Android.Util.IAttributeSet attrs, int defStyleAttr);

Parameters

context
Context

The Context the view is running in, through which it can access the current theme, resources, etc.

attrs
IAttributeSet

The attributes of the XML tag that is inflating the view.

defStyleAttr
Int32

An attribute in the current theme that contains a reference to a style resource that supplies default values for the view. Can be 0 to not look for defaults.

Applies to

SkiaSharp Views 2.88.x och andra versioner
Produkt Versioner
SkiaSharp Views 1.60.x, 1.68.x, 2.80.x, 2.88.x