Edit

SKCanvasView Constructors

Definition

Overloads

Name Description
SKCanvasView(Context)

Initializes a new instance of the SKCanvasView class.

SKCanvasView(Context, IAttributeSet)

Initializes a new instance of the SKCanvasView class with the specified XML attributes.

SKCanvasView(IntPtr, JniHandleOwnership)

Initializes a new instance of the SKCanvasView class from a JNI object reference.

SKCanvasView(Context, IAttributeSet, Int32)

Initializes a new instance of the SKCanvasView class with the specified XML attributes and style.

SKCanvasView(Context)

Initializes a new instance of the SKCanvasView class.

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.

Remarks

Use this constructor when creating the view programmatically from code.

Applies to

SKCanvasView(Context, IAttributeSet)

Initializes a new instance of the SKCanvasView class with the specified XML attributes.

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.

Remarks

This constructor is called when inflating the view from an Android XML layout file.

Applies to

SKCanvasView(IntPtr, JniHandleOwnership)

Initializes a new instance of the SKCanvasView class from a JNI object reference.

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.

Remarks

This constructor is used by the Xamarin.Android runtime when creating managed representations of JNI objects. It is not intended to be called directly from user code.

Applies to

SKCanvasView(Context, IAttributeSet, Int32)

Initializes a new instance of the SKCanvasView class with the specified XML attributes and style.

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.

Remarks

This constructor is called when inflating the view from an Android XML layout file and applying a class-specific base style from a theme attribute.

Applies to