Table of Contents

Class SkiaControl

Namespace
DrawnUi.Draw
Assembly
DrawnUi.Maui.dll
public class SkiaControl : VisualElement, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IVisualElementController, IElementController, IView, ITransform, IElement, IVisualTreeElement, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISkiaGestureListener, IHasAfterEffects, ISkiaControl, IDrawnBase, ICanBeUpdatedWithContext, ICanBeUpdated, ISkiaDisposable, IDisposable
Inheritance
SkiaControl
Implements
Derived
Inherited Members
Extension Methods

Constructors

SkiaControl()

public SkiaControl()

Fields

AddMarginBottomProperty

public static readonly BindableProperty AddMarginBottomProperty

Field Value

BindableProperty

AddMarginLeftProperty

public static readonly BindableProperty AddMarginLeftProperty

Field Value

BindableProperty

AddMarginRightProperty

public static readonly BindableProperty AddMarginRightProperty

Field Value

BindableProperty

AddMarginTopProperty

public static readonly BindableProperty AddMarginTopProperty

Field Value

BindableProperty

AddTranslationXProperty

public static readonly BindableProperty AddTranslationXProperty

Field Value

BindableProperty

AddTranslationYProperty

public static readonly BindableProperty AddTranslationYProperty

Field Value

BindableProperty

AdjustClippingProperty

public static readonly BindableProperty AdjustClippingProperty

Field Value

BindableProperty

AlignContentHorizontalProperty

public static readonly BindableProperty AlignContentHorizontalProperty

Field Value

BindableProperty

AlignContentVerticalProperty

public static readonly BindableProperty AlignContentVerticalProperty

Field Value

BindableProperty

AllowCachingProperty

public static readonly BindableProperty AllowCachingProperty

Field Value

BindableProperty

AnimationTappedProperty

public static readonly BindableProperty AnimationTappedProperty

Field Value

BindableProperty

AutoCacheProperty

public static readonly BindableProperty AutoCacheProperty

Field Value

BindableProperty

BindableTriggerProperty

public static readonly BindableProperty BindableTriggerProperty

Field Value

BindableProperty

BlackColor

public static Color BlackColor

Field Value

Color

BlockGesturesBelowProperty

public static readonly BindableProperty BlockGesturesBelowProperty

Field Value

BindableProperty

ChildrenProperty

public static readonly BindableProperty ChildrenProperty

Field Value

BindableProperty

ClearColorProperty

public static readonly BindableProperty ClearColorProperty

Field Value

BindableProperty

ClipEffectsProperty

public static readonly BindableProperty ClipEffectsProperty

Field Value

BindableProperty

ClipWithProperty

public static readonly BindableProperty ClipWithProperty

Field Value

BindableProperty

ClippedEffectsWithProperty

public static readonly BindableProperty ClippedEffectsWithProperty

Field Value

BindableProperty

CommandChildTappedProperty

public static readonly BindableProperty CommandChildTappedProperty

Field Value

BindableProperty

ControlStyleProperty

public static readonly BindableProperty ControlStyleProperty

Field Value

BindableProperty

DebugRenderingColor

public static SKColor DebugRenderingColor

Field Value

SKColor

DebugRenderingProperty

public static readonly BindableProperty DebugRenderingProperty

Field Value

BindableProperty

DefaultBlendMode

protected static SKBlendMode DefaultBlendMode

Field Value

SKBlendMode

DelegateGetOnScreenVisibleArea

public Func<Vector2, ScaledRect> DelegateGetOnScreenVisibleArea

Field Value

Func<Vector2, ScaledRect>

DirtyChildrenTracker

public readonly ControlsTracker DirtyChildrenTracker

Field Value

ControlsTracker

DisableEffectsProperty

public static readonly BindableProperty DisableEffectsProperty

Field Value

BindableProperty

DisposalDelay

public static TimeSpan DisposalDelay

Field Value

TimeSpan

EffectColorFilter

protected IColorEffect EffectColorFilter

Field Value

IColorEffect

EffectImageFilter

protected IImageEffect EffectImageFilter

Field Value

IImageEffect

EffectPostRenderers

public List<IPostRendererEffect> EffectPostRenderers

Field Value

List<IPostRendererEffect>

EffectRenderers

protected List<IRenderEffect> EffectRenderers

Field Value

List<IRenderEffect>

EffectsGestureProcessors

protected List<ISkiaGestureProcessor> EffectsGestureProcessors

Field Value

List<ISkiaGestureProcessor>

EffectsState

protected List<IStateEffect> EffectsState

Field Value

List<IStateEffect>

ExpandDirtyRegionProperty

public static readonly BindableProperty ExpandDirtyRegionProperty

Field Value

BindableProperty

FastMeasurementProperty

public static readonly BindableProperty FastMeasurementProperty

Field Value

BindableProperty

FillBlendModeProperty

public static readonly BindableProperty FillBlendModeProperty

Field Value

BindableProperty

FillGradientProperty

public static readonly BindableProperty FillGradientProperty

Field Value

BindableProperty

HeightRequestRatioProperty

public static readonly BindableProperty HeightRequestRatioProperty

Field Value

BindableProperty

Helper3d

public Sk3dView Helper3d

Field Value

Sk3dView

HorizontalFillRatioProperty

public static readonly BindableProperty HorizontalFillRatioProperty

Field Value

BindableProperty

HorizontalOptionsProperty

public static readonly BindableProperty HorizontalOptionsProperty

Field Value

BindableProperty

HorizontalPositionOffsetRatioProperty

public static readonly BindableProperty HorizontalPositionOffsetRatioProperty

Field Value

BindableProperty

IgnoreChildrenInvalidationsProperty

public static readonly BindableProperty IgnoreChildrenInvalidationsProperty

Field Value

BindableProperty

InvalidatedParent

public bool InvalidatedParent

Field Value

bool

IsClippedToBoundsProperty

public static readonly BindableProperty IsClippedToBoundsProperty

Field Value

BindableProperty

IsGhostProperty

public static readonly BindableProperty IsGhostProperty

Field Value

BindableProperty

IsHoveredProperty

public static readonly BindableProperty IsHoveredProperty

Field Value

BindableProperty

ItemTemplateProperty

public static readonly BindableProperty ItemTemplateProperty

Field Value

BindableProperty

ItemTemplateTypeProperty

public static readonly BindableProperty ItemTemplateTypeProperty

Field Value

BindableProperty

LastArrangedInside

protected SKRect LastArrangedInside

Field Value

SKRect

LastGradient

protected CachedGradient LastGradient

Field Value

CachedGradient

LastShadow

protected CachedShadow LastShadow

Field Value

CachedShadow

LockChildrenGesturesProperty

public static readonly BindableProperty LockChildrenGesturesProperty

Field Value

BindableProperty

LockDraw

Lock between replacing and using RenderObject

protected object LockDraw

Field Value

object

LockFocusProperty

public static readonly BindableProperty LockFocusProperty

Field Value

BindableProperty

LockIterateListeners

protected object LockIterateListeners

Field Value

object

LockMeasure

public object LockMeasure

Field Value

object

LockRatioProperty

public static readonly BindableProperty LockRatioProperty

Field Value

BindableProperty

LockRenderObject

Creating new cache lock

protected object LockRenderObject

Field Value

object

MarginProperty

public static readonly BindableProperty MarginProperty

Field Value

BindableProperty

NeedRemeasuring

protected bool NeedRemeasuring

Field Value

bool

OnGestures

Delegate for use instead of calling base.OnSkiaGestureEvent

public Func<SkiaGesturesParameters, GestureEventProcessingInfo, ISkiaGestureListener> OnGestures

Field Value

Func<SkiaGesturesParameters, GestureEventProcessingInfo, ISkiaGestureListener>

PaddingProperty

public static readonly BindableProperty PaddingProperty

Field Value

BindableProperty

PaintErase

protected SKPaint PaintErase

Field Value

SKPaint

ParentProperty

public static readonly BindableProperty ParentProperty

Field Value

BindableProperty

PendingUnattachedAnimators

protected ConcurrentBag<ISkiaAnimator> PendingUnattachedAnimators

Field Value

ConcurrentBag<ISkiaAnimator>

Perspective1Property

public static readonly BindableProperty Perspective1Property

Field Value

BindableProperty

Perspective2Property

public static readonly BindableProperty Perspective2Property

Field Value

BindableProperty

Random

public static Random Random

Field Value

Random

RedColor

public static Color RedColor

Field Value

Color

RenderCount

protected long RenderCount

Field Value

long

RenderingInvalidated

protected long RenderingInvalidated

Field Value

long

RenderingScaleProperty

public static readonly BindableProperty RenderingScaleProperty

Field Value

BindableProperty

RotationZProperty

public static readonly BindableProperty RotationZProperty

Field Value

BindableProperty

RoundCenterAlignment

public bool RoundCenterAlignment

Field Value

bool

SkewXProperty

public static readonly BindableProperty SkewXProperty

Field Value

BindableProperty

SkewYProperty

public static readonly BindableProperty SkewYProperty

Field Value

BindableProperty

SkipRenderingOutOfBoundsProperty

public static readonly BindableProperty SkipRenderingOutOfBoundsProperty

Field Value

BindableProperty

SpacingProperty

public static readonly BindableProperty SpacingProperty

Field Value

BindableProperty

TagProperty

public static readonly BindableProperty TagProperty

Field Value

BindableProperty

TouchEffectColorProperty

public static readonly BindableProperty TouchEffectColorProperty

Field Value

BindableProperty

TransformViewProperty

public static readonly BindableProperty TransformViewProperty

Field Value

BindableProperty

TranslationZProperty

public static readonly BindableProperty TranslationZProperty

Field Value

BindableProperty

TransparentColor

public static Color TransparentColor

Field Value

Color

UpdateWhenReturnedFromBackgroundProperty

public static readonly BindableProperty UpdateWhenReturnedFromBackgroundProperty

Field Value

BindableProperty

UpdatedInvalidation

protected long UpdatedInvalidation

Field Value

long

UpdatedRendering

protected long UpdatedRendering

Field Value

long

UseCacheProperty

public static readonly BindableProperty UseCacheProperty

Field Value

BindableProperty

Value1Property

public static readonly BindableProperty Value1Property

Field Value

BindableProperty

Value2Property

public static readonly BindableProperty Value2Property

Field Value

BindableProperty

Value3Property

public static readonly BindableProperty Value3Property

Field Value

BindableProperty

Value4Property

public static readonly BindableProperty Value4Property

Field Value

BindableProperty

VerticalFillRatioProperty

public static readonly BindableProperty VerticalFillRatioProperty

Field Value

BindableProperty

VerticalOptionsProperty

public static readonly BindableProperty VerticalOptionsProperty

Field Value

BindableProperty

VerticalPositionOffsetRatioProperty

public static readonly BindableProperty VerticalPositionOffsetRatioProperty

Field Value

BindableProperty

ViewportHeightLimitProperty

public static readonly BindableProperty ViewportHeightLimitProperty

Field Value

BindableProperty

ViewportWidthLimitProperty

public static readonly BindableProperty ViewportWidthLimitProperty

Field Value

BindableProperty

VirtualisationInflatedProperty

public static readonly BindableProperty VirtualisationInflatedProperty

Field Value

BindableProperty

VirtualizationProperty

public static readonly BindableProperty VirtualizationProperty

Field Value

BindableProperty

VisualEffectsProperty

public static readonly BindableProperty VisualEffectsProperty

Field Value

BindableProperty

WhiteColor

public static Color WhiteColor

Field Value

Color

WidthRequestRatioProperty

public static readonly BindableProperty WidthRequestRatioProperty

Field Value

BindableProperty

_arrangedViewportHeightLimit

protected double _arrangedViewportHeightLimit

Field Value

double

_arrangedViewportWidthLimit

protected double _arrangedViewportWidthLimit

Field Value

double

_builtRenderTreeStamp

protected long _builtRenderTreeStamp

Field Value

long

_lastMeasuredForScale

protected float _lastMeasuredForScale

Field Value

float

_measuredStamp

protected long _measuredStamp

Field Value

long

_paintWithEffects

protected SKPaint _paintWithEffects

Field Value

SKPaint

_paintWithOpacity

protected SKPaint _paintWithOpacity

Field Value

SKPaint

lockMeasured

protected object lockMeasured

Field Value

object

lockPausingAnimators

protected object lockPausingAnimators

Field Value

object

semaphoreOffsecreenProcess

protected SemaphoreSlim semaphoreOffsecreenProcess

Field Value

SemaphoreSlim

Properties

AddMarginBottom

public double AddMarginBottom { get; set; }

Property Value

double

AddMarginLeft

public double AddMarginLeft { get; set; }

Property Value

double

AddMarginRight

public double AddMarginRight { get; set; }

Property Value

double

AddMarginTop

public double AddMarginTop { get; set; }

Property Value

double

AddTranslationX

public double AddTranslationX { get; set; }

Property Value

double

AddTranslationY

public double AddTranslationY { get; set; }

Property Value

double

AdjustClipping

public Thickness AdjustClipping { get; set; }

Property Value

Thickness

AlignContentHorizontal

public LayoutOptions AlignContentHorizontal { get; set; }

Property Value

LayoutOptions

AlignContentVertical

public LayoutOptions AlignContentVertical { get; set; }

Property Value

LayoutOptions

AllowCaching

Might want to set this to False for certain cases.

public bool AllowCaching { get; set; }

Property Value

bool

AnimationTapped

public SkiaTouchAnimation AnimationTapped { get; set; }

Property Value

SkiaTouchAnimation

ArrangedDestination

public SKRect ArrangedDestination { get; protected set; }

Property Value

SKRect

AutoCache

Control will be responsible for controlling cache instead of using UseCache property.

public bool AutoCache { get; set; }

Property Value

bool

BindableTrigger

public object BindableTrigger { get; set; }

Property Value

object

BindingContextWasSet

protected bool BindingContextWasSet { get; set; }

Property Value

bool

BindingsContextCacheWasRendered

protected bool BindingsContextCacheWasRendered { get; set; }

Property Value

bool

BlockGesturesBelow

If set to true will not allow gestures to go below

public bool BlockGesturesBelow { get; set; }

Property Value

bool

CacheValidity

public SkiaControl.CacheValidityType CacheValidity { get; protected set; }

Property Value

SkiaControl.CacheValidityType

CachedImage

Provides a cached image if any

public virtual SKImage CachedImage { get; }

Property Value

SKImage

CanDraw

public virtual bool CanDraw { get; }

Property Value

bool

Children

This is used by MAUI to set content from XAML.

public IList<SkiaControl> Children { get; set; }

Property Value

IList<SkiaControl>

ClearColor

public Color ClearColor { get; set; }

Property Value

Color

ClipEffects

This cuts shadows etc

public bool ClipEffects { get; set; }

Property Value

bool

ClipWith

Can specify another control that would provide the clipping region for this one.

public SkiaControl ClipWith { get; set; }

Property Value

SkiaControl

ClippedEffectsWith

Can specify another control that would provide the clipping region to be used by post animattors etc.

public SkiaControl ClippedEffectsWith { get; set; }

Property Value

SkiaControl

Clipping

public Action<SKPath, SKRect> Clipping { get; set; }

Property Value

Action<SKPath, SKRect>

CommandChildTapped

Child was tapped. Will pass the tapped child as parameter. You might want then read child's BindingContext etc.. This works only if your control implements ISkiaGestureListener. If this is set then the Tapped gesture will be consumed by this control after passing it to child.

public ICommand CommandChildTapped { get; set; }

Property Value

ICommand

ContentSize

public ScaledSize ContentSize { get; protected set; }

Property Value

ScaledSize

ContextIndex

For internal use, will be set for recycled/templated views by the ViewFactory to the corresponding index in the data source.

public int ContextIndex { get; set; }

Property Value

int

ControlStyle

Will be used by control CreateDefaultContent to create appropriate look. Then controls use a virtual UsingControlStyle property to define their look.

public PrebuiltControlStyle ControlStyle { get; set; }

Property Value

PrebuiltControlStyle

Count

Gets the number of elements contained in the ICollection<T>.

public int Count { get; }

Property Value

int

The number of elements contained in the ICollection<T>.

CustomizeLayerPaint

Can customize the SKPaint used for painting the object

public Action<SKPaint, SKRect> CustomizeLayerPaint { get; set; }

Property Value

Action<SKPaint, SKRect>

DebugRendering

public bool DebugRendering { get; set; }

Property Value

bool

DebugString

public virtual string DebugString { get; }

Property Value

string

DefaultContentCreated

protected bool DefaultContentCreated { get; set; }

Property Value

bool

DelegateDrawCache

public Action<DrawingContext, CachedObject> DelegateDrawCache { get; set; }

Property Value

Action<DrawingContext, CachedObject>

DirtyChildrenInternal

protected HashSet<SkiaControl> DirtyChildrenInternal { get; set; }

Property Value

HashSet<SkiaControl>

DirtyRegion

public SKRect DirtyRegion { get; set; }

Property Value

SKRect

DisableEffects

public bool DisableEffects { get; set; }

Property Value

bool

DrawingRect

This is the destination in PIXELS with margins applied, using this to paint background. Since we enabled subpixel drawing (for smooth scroll etc) expect this to have non-rounded values, use CompareRects and similar for comparison.

public SKRect DrawingRect { get; set; }

Property Value

SKRect

ExecuteAfterCreated

This will be executed ones along and just before the CreateDefaultContent. This lets you execute initialization code after the control is already in the view tree and all variables you might want to use are already filled.

public Dictionary<string, Action<SkiaControl>> ExecuteAfterCreated { get; }

Property Value

Dictionary<string, Action<SkiaControl>>

ExecuteOnPaint

public Dictionary<string, Action<SkiaControl, DrawingContext>> ExecuteOnPaint { get; }

Property Value

Dictionary<string, Action<SkiaControl, DrawingContext>>

ExecuteUponDisposal

This will be executed when the control is being disposed, use to avoid memory leaks. Example of usage, an extension that would subscribe to something and add unsubscribtion here.

public Dictionary<string, Action> ExecuteUponDisposal { get; }

Property Value

Dictionary<string, Action>

ExpandDirtyRegion

Thickness In points. You might want to expand this when your control drops shadows or does something else depassing normal bounds. This will be used for ImageComposite dirty regions management and when caching rectangles Normally cache is recorded inside DrawingRect, but you might want to expand this to include shadows around, for example. Specify number of points by which you want to expand the recording area. Also you might maybe want to include a bigger area if your control is not inside the DrawingRect due to transforms/translations. Override GetCacheRecordingArea method for a similar action.

public Thickness ExpandDirtyRegion { get; set; }

Property Value

Thickness

FastMeasurement

When true, uses single-pass fast measurement. When false, uses 3-pass measurement with Fill handling.

public bool FastMeasurement { get; set; }

Property Value

bool

FillBlendMode

public SKBlendMode FillBlendMode { get; set; }

Property Value

SKBlendMode

FillGradient

public SkiaGradient FillGradient { get; set; }

Property Value

SkiaGradient

GestureListenerRegistrationTime

public DateTime? GestureListenerRegistrationTime { get; set; }

Property Value

DateTime?

GestureListeners

Children we should check for touch hits

public SortedGestureListeners GestureListeners { get; }

Property Value

SortedGestureListeners

GesturesEffect

public AddGestures.GestureListener GesturesEffect { get; set; }

Property Value

AddGestures.GestureListener

HasFillGradient

public bool HasFillGradient { get; }

Property Value

bool

HasItemTemplate

public bool HasItemTemplate { get; }

Property Value

bool

Height

public double Height { get; set; }

Property Value

double

HeightRequestRatio

HeightRequest Multiplier, default is 1.0

public double HeightRequestRatio { get; set; }

Property Value

double

Hero

Optional scene hero control identifier

public string Hero { get; set; }

Property Value

string

HitBoxAuto

This can be absolutely false if we are inside a cached rendering object parent that already moved somewhere. So coords will be of the moment we were first drawn, while if cached parent moved, our coords might differ. todo detect if parent is cached somewhere and offset hotbox by cached parent movement offset... todo think about it baby =) meanwhile just do not set gestures below cached level

public virtual SKRect HitBoxAuto { get; }

Property Value

SKRect

HorizontalFillRatio

This would be applied to the reported available dimension for the control to fill. The parent layout is responsible for aliignement.

public double HorizontalFillRatio { get; set; }

Property Value

double

HorizontalOptions

public LayoutOptions HorizontalOptions { get; set; }

Property Value

LayoutOptions

HorizontalPositionOffsetRatio

public double HorizontalPositionOffsetRatio { get; set; }

Property Value

double

IgnoreChildrenInvalidations

public bool IgnoreChildrenInvalidations { get; set; }

Property Value

bool

Invalidated

public bool Invalidated { get; set; }

Property Value

bool

InverseRenderTransformMatrix

Gets the inverse of the rendering transformation matrix for hit testing

public SKMatrix InverseRenderTransformMatrix { get; }

Property Value

SKMatrix

IsAlive

public ObjectAliveType IsAlive { get; set; }

Property Value

ObjectAliveType

IsCacheImage

public bool IsCacheImage { get; }

Property Value

bool

IsCacheOperations

public bool IsCacheOperations { get; }

Property Value

bool

IsClippedToBounds

This cuts shadows etc. You might want to enable it for some cases as it speeds up the rendering, it is False by default

public bool IsClippedToBounds { get; set; }

Property Value

bool

IsDisposed

public bool IsDisposed { get; protected set; }

Property Value

bool

IsDisposing

public bool IsDisposing { get; protected set; }

Property Value

bool

IsGhost

Takes place in layout, acts like is visible, but just not rendering

public bool IsGhost { get; set; }

Property Value

bool

IsHovered

public bool IsHovered { get; set; }

Property Value

bool

IsLayoutDirty

Set this by parent if needed, normally child can detect this itsself. If true will call Arrange when drawing.

public bool IsLayoutDirty { get; set; }

Property Value

bool

IsLayoutReady

Will be set by OnLayoutReady

public bool IsLayoutReady { get; protected set; }

Property Value

bool

IsMeasuring

Flag for internal use, maynly used to avoid conflicts between measuring on ui-thread and in background. If true, measure will return last measured value.

public bool IsMeasuring { get; protected set; }

Property Value

bool

IsOverlay

do not ever erase background

public bool IsOverlay { get; set; }

Property Value

bool

IsParentIndependent

public bool IsParentIndependent { get; set; }

Property Value

bool

IsReadOnly

Gets a value indicating whether the ICollection<T> is read-only.

public bool IsReadOnly { get; }

Property Value

bool

true if the ICollection<T> is read-only; otherwise, false.

IsRendering

protected bool IsRendering { get; set; }

Property Value

bool

this[int]

Gets or sets the element at the specified index.

public IView this[int index] { get; set; }

Parameters

index int

The zero-based index of the element to get or set.

Property Value

IView

The element at the specified index.

Exceptions

ArgumentOutOfRangeException

index is not a valid index in the IList<T>.

NotSupportedException

The property is set and the IList<T> is read-only.

ItemTemplate

Kind of BindableLayout.DrawnTemplate

public DataTemplate ItemTemplate { get; set; }

Property Value

DataTemplate

ItemTemplateType

ItemTemplate alternative for faster creation

public Type ItemTemplateType { get; set; }

Property Value

Type

LastDrawnAt

Location on the canvas after last drawing completed

public SKRect LastDrawnAt { get; protected set; }

Property Value

SKRect

LayoutReady

public bool LayoutReady { get; protected set; }

Property Value

bool

Left

Offset cache (RenderObject) in points. This works similar to TranslationX but uses no matrix transform, works faster. For code-behind fast reposition of cached controls, background thread friendly, no bindings involved. Cached controls only, not a bindable property, doesn't trigger repaint, would need to do this manually if needed.

public double Left { get; set; }

Property Value

double

LifecycleState

public ControlLifecycleState LifecycleState { get; protected set; }

Property Value

ControlLifecycleState

LinkTransforms

public SkiaControl LinkTransforms { get; set; }

Property Value

SkiaControl

LockChildrenGestures

What gestures are allowed to be passed to children below. If set to Enabled wit, otherwise can be more specific.

public LockTouch LockChildrenGestures { get; set; }

Property Value

LockTouch

LockFocus

public bool LockFocus { get; set; }

Property Value

bool

LockRatio

Locks the final size to the min (-1.0 -> 0.0) or max (0.0 -> 1.0) of the provided size.

public double LockRatio { get; set; }

Property Value

double

Margin

public Thickness Margin { get; set; }

Property Value

Thickness

Margins

Total calculated margins in points

public Thickness Margins { get; protected set; }

Property Value

Thickness

MeasuredSize

public ScaledSize MeasuredSize { get; set; }

Property Value

ScaledSize

NativeParent

public Element NativeParent { get; }

Property Value

Element

NeedAutoHeight

public virtual bool NeedAutoHeight { get; }

Property Value

bool

NeedAutoSize

public virtual bool NeedAutoSize { get; }

Property Value

bool

NeedAutoWidth

public virtual bool NeedAutoWidth { get; }

Property Value

bool

NeedDispose

Developer can use this to mark control as to be disposed by parent custom controls

public bool NeedDispose { get; set; }

Property Value

bool

NeedFillHorizontally

public bool NeedFillHorizontally { get; }

Property Value

bool

NeedFillVertically

public bool NeedFillVertically { get; }

Property Value

bool

NeedFillX

public virtual bool NeedFillX { get; }

Property Value

bool

NeedFillY

public virtual bool NeedFillY { get; }

Property Value

bool

NeedMeasure

public virtual bool NeedMeasure { get; set; }

Property Value

bool

NeedUpdate

For internal use, set by Update method

public virtual bool NeedUpdate { get; set; }

Property Value

bool

NeedUpdateFrontCache

Used by ImageDoubleBuffering cache

protected bool NeedUpdateFrontCache { get; set; }

Property Value

bool

NodeAttached

protected bool NodeAttached { get; set; }

Property Value

bool

OutputDebug

Enable this to get console logs specifically from this instance

public bool OutputDebug { get; set; }

Property Value

bool

Padding

public Thickness Padding { get; set; }

Property Value

Thickness

PaintSystem

protected SKPaint PaintSystem { get; set; }

Property Value

SKPaint

Parent

Do not set this directly if you don't know what you are doing, use SetParent()

public IDrawnBase Parent { get; set; }

Property Value

IDrawnBase

Perspective1

public float Perspective1 { get; set; }

Property Value

float

Perspective2

public float Perspective2 { get; set; }

Property Value

float

PlatformShadow

protected SkiaShadow PlatformShadow { get; set; }

Property Value

SkiaShadow

PostAnimators

Executed after the rendering

public List<IOverlayEffect> PostAnimators { get; }

Property Value

List<IOverlayEffect>

RenderObject

The cached representation of the control. Will be used on redraws without calling Paint etc, until the control is requested to be updated. This WILL NOT raise PropertyChanged !!! (avoiding MAUI concurrent access conflict) Use OnCacheCreated (CacheCreated event) and OnCacheDestroyed (CacheDestroyed event).

public CachedObject RenderObject { get; set; }

Property Value

CachedObject

RenderTransformMatrix

Stores the transformation matrix used during rendering for hit testing

public SKMatrix RenderTransformMatrix { get; protected set; }

Property Value

SKMatrix

RenderTree

Last rendered controls tree. Used by gestures etc..Please use SetRenderingTree method for setting it correctly.

public List<SkiaControlWithRect> RenderTree { get; protected set; }

Property Value

List<SkiaControlWithRect>

RenderedAtDestination

public SKRect RenderedAtDestination { get; set; }

Property Value

SKRect

RenderingScale

public float RenderingScale { get; set; }

Property Value

float

RotationZ

Gets or sets the rotation (in degrees) about the Z-axis (perspective rotation) when the element is rendered. This is a bindable property.

public double RotationZ { get; set; }

Property Value

double

Remarks

Rotation is applied relative to AnchorX and AnchorY.

Scale

Please use ScaleX, ScaleY instead of this maui property

public double Scale { get; set; }

Property Value

double

ShouldClipAntialiased

This is not a static bindable property. Can be set manually or by control, for example SkiaShape sets this to true for non-rectangular shapes, or rounded corners..

public bool ShouldClipAntialiased { get; set; }

Property Value

bool

ShouldInvalidateByChildren

public virtual bool ShouldInvalidateByChildren { get; }

Property Value

bool

SizeRequest

Is set by UpdateSizeRequest();

public SKSize SizeRequest { get; protected set; }

Property Value

SKSize

SkewX

public float SkewX { get; set; }

Property Value

float

SkewY

public float SkewY { get; set; }

Property Value

float

SkipRendering

Can be set but custom controls while optimizing rendering etc. Will affect CanDraw.

public bool SkipRendering { get; set; }

Property Value

bool

SkipRenderingOutOfBounds

If set to true will not draw after VisualLayer is set and detected to be out of rendering bound. Useful for drawer contained elements and similar.

public bool SkipRenderingOutOfBounds { get; set; }

Property Value

bool

Spacing

public double Spacing { get; set; }

Property Value

double

Superview

Our canvas

public DrawnView Superview { get; protected set; }

Property Value

DrawnView

Tag

public string Tag { get; set; }

Property Value

string

Top

Offset cache (RenderObject) in points. This works similar to TranslationY but uses no matrix transform, works faster. For code-behind fast reposition of cached controls, background thread friendly, no bindings involved. Cached controls only, not a bindable property, doesn't trigger repaint, would need to do this manually if needed.

public double Top { get; set; }

Property Value

double

TouchEffectColor

public Color TouchEffectColor { get; set; }

Property Value

Color

TransformView

public object TransformView { get; set; }

Property Value

object

TranslationZ

Gets or sets Z-perspective translation. This is a bindable property.

public double TranslationZ { get; set; }

Property Value

double

Remarks

Rotation is applied relative to AnchorX and AnchorY.

Uid

public Guid Uid { get; set; }

Property Value

Guid

UpdateLocks

public int UpdateLocks { get; }

Property Value

int

UpdateWhenReturnedFromBackground

public bool UpdateWhenReturnedFromBackground { get; set; }

Property Value

bool

UseCache

Never reuse the rendering result. Actually true for ScrollLooped SkiaLayout viewport container to redraw its content several times for creating a looped aspect.

public SkiaCacheType UseCache { get; set; }

Property Value

SkiaCacheType

UsePadding

public Thickness UsePadding { get; protected set; }

Property Value

Thickness

UseTranslationX

public double UseTranslationX { get; }

Property Value

double

UseTranslationY

public double UseTranslationY { get; }

Property Value

double

UsingCacheType

public virtual SkiaCacheType UsingCacheType { get; }

Property Value

SkiaCacheType

UsingControlStyle

public virtual PrebuiltControlStyle UsingControlStyle { get; }

Property Value

PrebuiltControlStyle

Value1

For Arc: start angle

public double Value1 { get; set; }

Property Value

double

Value2

For Arc: sweep angle

public double Value2 { get; set; }

Property Value

double

Value3

public double Value3 { get; set; }

Property Value

double

Value4

public double Value4 { get; set; }

Property Value

double

VerticalFillRatio

This would be applied to the reported available dimension for the control to fill. The parent layout is responsible for aliignement.

public double VerticalFillRatio { get; set; }

Property Value

double

VerticalOptions

public LayoutOptions VerticalOptions { get; set; }

Property Value

LayoutOptions

VerticalPositionOffsetRatio

public double VerticalPositionOffsetRatio { get; set; }

Property Value

double

ViewportHeightLimit

Will be used inside GetDrawingRectWithMargins to limit the height of the DrawingRect

public double ViewportHeightLimit { get; set; }

Property Value

double

ViewportWidthLimit

Will be used inside GetDrawingRectWithMargins to limit the width of the DrawingRect

public double ViewportWidthLimit { get; set; }

Property Value

double

Views

For internal use

public List<SkiaControl> Views { get; }

Property Value

List<SkiaControl>

Virtualisation

Default is Enabled, children get the visible viewport area for rendering and can virtualize.

public VirtualisationType Virtualisation { get; set; }

Property Value

VirtualisationType

VirtualisationInflated

How much of the hidden content out of visible bounds should be considered visible for rendering, default is 0 pts. Basically how much should be expand in every direction of the visible area prior to checking if content falls into its bounds for rendering controlled with Virtualisation.

public double VirtualisationInflated { get; set; }

Property Value

double

VisualEffects

public IList<SkiaEffect> VisualEffects { get; set; }

Property Value

IList<SkiaEffect>

VisualLayer

public VisualLayer? VisualLayer { get; set; }

Property Value

VisualLayer

WasMeasured

public bool WasMeasured { get; protected set; }

Property Value

bool

Width

public double Width { get; set; }

Property Value

double

WidthRequestRatio

WidthRequest Multiplier, default is 1.0

public double WidthRequestRatio { get; set; }

Property Value

double

WidthRequestWithMargins

Points

public double WidthRequestWithMargins { get; }

Property Value

double

WillInvalidateMeasure

protected bool WillInvalidateMeasure { get; set; }

Property Value

bool

WillNotUpdateParent

Will not call Update on Parent if True

public bool WillNotUpdateParent { get; set; }

Property Value

bool

X

Absolute position obtained after this control was drawn on the Canvas, this is not relative to parent control.

public double X { get; protected set; }

Property Value

double

Y

Absolute position obtained after this control was drawn on the Canvas, this is not relative to parent control.

public double Y { get; protected set; }

Property Value

double

_lastMeasuredForHeight

public float _lastMeasuredForHeight { get; protected set; }

Property Value

float

_lastMeasuredForWidth

public float _lastMeasuredForWidth { get; protected set; }

Property Value

float

Methods

ActionWithClipping(SKRect, SKCanvas, Action)

protected void ActionWithClipping(SKRect viewport, SKCanvas canvas, Action draw)

Parameters

viewport SKRect
canvas SKCanvas
draw Action

AdaptCachedLayout(SKRect, float)

protected virtual void AdaptCachedLayout(SKRect destination, float scale)

Parameters

destination SKRect
scale float

AdaptConstraintToContentRequest(float, double, double, bool, double, double, float, bool)

public static float AdaptConstraintToContentRequest(float constraintPixels, double measuredDimension, double sideConstraintsPixels, bool autoSize, double minRequest, double maxRequest, float scale, bool canExpand)

Parameters

constraintPixels float
measuredDimension double
sideConstraintsPixels double
autoSize bool
minRequest double
maxRequest double
scale float
canExpand bool

Returns

float

AdaptHeightConstraintToContentRequest(MeasuringConstraints, float, bool)

public float AdaptHeightConstraintToContentRequest(MeasuringConstraints constraints, float contentHeightPixels, bool canExpand)

Parameters

constraints MeasuringConstraints
contentHeightPixels float
canExpand bool

Returns

float

AdaptHeightConstraintToContentRequest(float, ScaledSize, double)

public float AdaptHeightConstraintToContentRequest(float heightConstraintPixels, ScaledSize measuredContent, double sideConstraintsPixels)

Parameters

heightConstraintPixels float
measuredContent ScaledSize
sideConstraintsPixels double

Returns

float

AdaptHeightContraintToRequest(float, Thickness, double)

Apply margins to SizeRequest

public float AdaptHeightContraintToRequest(float sizeConstraint, Thickness constraints, double scale)

Parameters

sizeConstraint float
constraints Thickness
scale double

Returns

float

AdaptSizeRequestToContent(double, double)

In UNITS

protected Size AdaptSizeRequestToContent(double widthRequestPts, double heightRequestPts)

Parameters

widthRequestPts double
heightRequestPts double

Returns

Size

AdaptToContraints(SKRect, double, double, double, double)

public SKRect AdaptToContraints(SKRect measuredPixels, double constraintLeft, double constraintRight, double constraintTop, double constraintBottom)

Parameters

measuredPixels SKRect
constraintLeft double
constraintRight double
constraintTop double
constraintBottom double

Returns

SKRect

AdaptWidthConstraintToContentRequest(MeasuringConstraints, float, bool)

public float AdaptWidthConstraintToContentRequest(MeasuringConstraints constraints, float contentWidthPixels, bool canExpand)

Parameters

constraints MeasuringConstraints
contentWidthPixels float
canExpand bool

Returns

float

AdaptWidthConstraintToContentRequest(float, ScaledSize, double)

public float AdaptWidthConstraintToContentRequest(float widthConstraintPixels, ScaledSize measuredContent, double sideConstraintsPixels)

Parameters

widthConstraintPixels float
measuredContent ScaledSize
sideConstraintsPixels double

Returns

float

AdaptWidthConstraintToRequest(float, Thickness, double)

Apply margins to SizeRequest

public float AdaptWidthConstraintToRequest(float sizeConstraint, Thickness constraints, double scale)

Parameters

sizeConstraint float
constraints Thickness
scale double

Returns

float

Add(IView)

Adds an item to the ICollection<T>.

public void Add(IView item)

Parameters

item IView

The object to add to the ICollection<T>.

Exceptions

NotSupportedException

The ICollection<T> is read-only.

AddOrRemoveView(SkiaControl, bool)

protected void AddOrRemoveView(SkiaControl subView, bool add)

Parameters

subView SkiaControl
add bool

AddPaintArguments(DrawingContext)

public virtual DrawingContext AddPaintArguments(DrawingContext ctx)

Parameters

ctx DrawingContext

Returns

DrawingContext

AddSubView(SkiaControl)

Directly adds a view to the control, without any layouting. Use this instead of Views.Add() to avoid memory leaks etc

public virtual void AddSubView(SkiaControl control)

Parameters

control SkiaControl

AnimateAsync(Action<double>, Action, float, Easing, CancellationTokenSource)

Creates a new animator, animates from 0 to 1 over a given time, and calls your callback with the current eased value

public Task AnimateAsync(Action<double> callback, Action callbaclOnCancel = null, float ms = 250, Easing easing = null, CancellationTokenSource cancel = null)

Parameters

callback Action<double>
callbaclOnCancel Action
ms float
easing Easing
cancel CancellationTokenSource

Returns

Task

AnimateRangeAsync(Action<double>, double, double, double, Easing, int, CancellationToken)

When the animator is cancelled if applyEndValueOnStop is true then the end value will be sent to your callback

public Task AnimateRangeAsync(Action<double> callback, double start, double end, double length = 250, Easing easing = null, int delayMs = 0, CancellationToken cancel = default)

Parameters

callback Action<double>
start double
end double
length double
easing Easing
delayMs int
cancel CancellationToken

Returns

Task

ApplyBindingContext()

public virtual void ApplyBindingContext()

ApplyMeasureResult()

Normally get a a Measure by parent then parent calls Draw and we can apply the measure result. But in a case we have measured us ourselves inside PreArrange etc we must call ApplyMeasureResult because this would happen after the Draw and not before.

public virtual void ApplyMeasureResult()

ApplyTransformationMatrix(SkiaDrawingContext)

protected virtual void ApplyTransformationMatrix(SkiaDrawingContext ctx)

Parameters

ctx SkiaDrawingContext

ApplyTransforms(SkiaDrawingContext, SKRect)

protected virtual void ApplyTransforms(SkiaDrawingContext ctx, SKRect destination)

Parameters

ctx SkiaDrawingContext
destination SKRect

ApplyTransforms(SKRect)

Will apply additional offsets: Left and Top. This is for GESTURES ONLY! work in progress

public SKRect ApplyTransforms(SKRect rect)

Parameters

rect SKRect

Returns

SKRect

AreClose(double, double)

Ported from Avalonia: AreClose - Returns whether or not two doubles are "close". That is, whether or not they are within epsilon of each other.

public static bool AreClose(double value1, double value2)

Parameters

value1 double

The first double to compare.

value2 double

The second double to compare.

Returns

bool

AreClose(float, float)

Ported from Avalonia: AreClose - Returns whether or not two floats are "close". That is, whether or not they are within epsilon of each other.

public static bool AreClose(float value1, float value2)

Parameters

value1 float

The first float to compare.

value2 float

The second float to compare.

Returns

bool

AreEqual(double, double, double)

public static bool AreEqual(double v1, double v2, double precision)

Parameters

v1 double
v2 double
precision double

Returns

bool

AreEqual(float, float, float)

public static bool AreEqual(float v1, float v2, float precision)

Parameters

v1 float
v2 float
precision float

Returns

bool

AreVectorsEqual(Vector2, Vector2, float)

public static bool AreVectorsEqual(Vector2 v1, Vector2 v2, float precision)

Parameters

v1 Vector2
v2 Vector2
precision float

Returns

bool

Arrange(SKRect, float, float, float)

destination in PIXELS, requests in UNITS. resulting Destination prop will be filed in PIXELS. DrawUsingRenderObject wil call this among others..

public virtual void Arrange(SKRect destination, float widthRequest, float heightRequest, float scale)

Parameters

destination SKRect

PIXELS

widthRequest float

UNITS

heightRequest float

UNITS

scale float

ArrangeCache(SKRect, float, float, float)

Arranges the control and updates its cache's LastDestination property. Used by ImageComposite composition mode when skipping drawing of non-dirty children but still needing to update their position for gesture coordinate translation.

public virtual void ArrangeCache(SKRect destination, float widthRequest, float heightRequest, float scale)

Parameters

destination SKRect
widthRequest float
heightRequest float
scale float

AttachEffects()

protected void AttachEffects()

AvoidRemeasuring(MeasureRequest)

public virtual bool AvoidRemeasuring(MeasureRequest request)

Parameters

request MeasureRequest

Returns

bool

BuildDrawingOffsetRecursive(SKPoint, SkiaControl, bool, bool)

public SKPoint BuildDrawingOffsetRecursive(SKPoint offset, SkiaControl control, bool ignoreCache, bool useTranslation = true)

Parameters

offset SKPoint
control SkiaControl
ignoreCache bool
useTranslation bool

Returns

SKPoint

BuildDrawnOffsetRecursive(SKPoint, SkiaControl, bool, bool)

public SKPoint BuildDrawnOffsetRecursive(SKPoint offset, SkiaControl control, bool ignoreCache, bool useTranslation = true)

Parameters

offset SKPoint
control SkiaControl
ignoreCache bool
useTranslation bool

Returns

SKPoint

BuildSelfDrawingPosition(SKPoint, SkiaControl, bool)

public SKPoint BuildSelfDrawingPosition(SKPoint offset, SkiaControl control, bool isChild)

Parameters

offset SKPoint
control SkiaControl
isChild bool

Returns

SKPoint

CalculateFuturePositionOffset(bool, bool, bool)

public virtual SKPoint CalculateFuturePositionOffset(bool cacheOnly = false, bool ignoreCache = false, bool useTranlsation = true)

Parameters

cacheOnly bool
ignoreCache bool
useTranlsation bool

Returns

SKPoint

CalculateLayout(SKRect, float, float, float)

destination in PIXELS, requests in UNITS. resulting Destination prop will be filed in PIXELS. Not using Margins nor UsePadding Children are responsible to apply UsePadding to their content and to apply Margin to destination when measuring and drawing

public virtual SKRect CalculateLayout(SKRect destination, float widthRequest, float heightRequest, float scale)

Parameters

destination SKRect

PIXELS

widthRequest float

UNITS

heightRequest float

UNITS

scale float

Returns

SKRect

CalculateMargins()

Summing up Margins and AddMargin.. properties

public virtual void CalculateMargins()

CalculatePositionOffset(bool, bool, bool)

public virtual SKPoint CalculatePositionOffset(bool cacheOnly = false, bool ignoreCache = false, bool useTranlsation = true)

Parameters

cacheOnly bool
ignoreCache bool
useTranlsation bool

Returns

SKPoint

CalculateSizeRequest()

protected virtual void CalculateSizeRequest()

CheckCachedObjectValid(CachedObject, SKRect, SkiaDrawingContext)

protected virtual bool CheckCachedObjectValid(CachedObject cache, SKRect recordingArea, SkiaDrawingContext context)

Parameters

cache CachedObject
recordingArea SKRect
context SkiaDrawingContext

Returns

bool

CheckChildGestureHit(SkiaControl, SkiaGesturesParameters, GestureEventProcessingInfo)

Ckecks if direct child is hit by gesture

public virtual bool CheckChildGestureHit(SkiaControl child, SkiaGesturesParameters args, GestureEventProcessingInfo apply)

Parameters

child SkiaControl
args SkiaGesturesParameters
apply GestureEventProcessingInfo

Returns

bool

CheckChildrenGesturesLocked(TouchActionResult)

protected bool CheckChildrenGesturesLocked(TouchActionResult action)

Parameters

action TouchActionResult

Returns

bool

CheckGestureIsForChild(SkiaControl, TouchActionEventArgs, float, float)

protected virtual bool CheckGestureIsForChild(SkiaControl child, TouchActionEventArgs args, float offsetX = 0, float offsetY = 0)

Parameters

child SkiaControl
args TouchActionEventArgs
offsetX float
offsetY float

Returns

bool

CheckGestureIsInsideChild(SkiaControl, TouchActionEventArgs, float, float)

protected virtual bool CheckGestureIsInsideChild(SkiaControl child, TouchActionEventArgs args, float offsetX = 0, float offsetY = 0)

Parameters

child SkiaControl
args TouchActionEventArgs
offsetX float
offsetY float

Returns

bool

CheckHovered(SkiaGesturesParameters)

Will check if hovered by pointer and set IsHovered accordingly

public virtual void CheckHovered(SkiaGesturesParameters args)

Parameters

args SkiaGesturesParameters

CheckIsGhost()

public bool CheckIsGhost()

Returns

bool

Clear()

Removes all items from the ICollection<T>.

public void Clear()

Exceptions

NotSupportedException

The ICollection<T> is read-only.

ClearChildren()

public virtual void ClearChildren()

ClearDirtyChildren()

public virtual void ClearDirtyChildren()

ClearParent()

This is called by SetParent when parent should be assigned to null. Internally this sets BindingContext to null after that. You might want to override this to keep BindngContext even if unattached from Parent, for example in case of recycled cells.

public virtual void ClearParent()

ClipSmart(SKCanvas, SKPath, SKClipOperation)

Use antialiasing from ShouldClipAntialiased

public virtual void ClipSmart(SKCanvas canvas, SKPath path, SKClipOperation operation = SKClipOperation.Intersect)

Parameters

canvas SKCanvas
path SKPath
operation SKClipOperation

CombineClipping(SKPath, SKPath)

protected SKPath CombineClipping(SKPath add, SKPath path)

Parameters

add SKPath
path SKPath

Returns

SKPath

CommitInvalidations()

Apply all postponed invalidation other logic that was postponed until the first draw for optimization. Use this for special code-behind cases, like tests etc, if you cannot wait until the first Draw(). In this version this affects ItemsSource only.

public void CommitInvalidations()

CompareDoubles(double, double, double)

public static bool CompareDoubles(double a, double b, double precision = 5E-324)

Parameters

a double
b double
precision double

Returns

bool

CompareFloats(float, float, float)

public static bool CompareFloats(float a, float b, float precision = 1E-45)

Parameters

a float
b float
precision float

Returns

bool

CompareRects(SKRect, SKRect, float)

public static bool CompareRects(SKRect a, SKRect b, float precision)

Parameters

a SKRect
b SKRect
precision float

Returns

bool

CompareRectsSize(SKRect, SKRect, float)

public static bool CompareRectsSize(SKRect a, SKRect b, float precision)

Parameters

a SKRect
b SKRect
precision float

Returns

bool

CompareSize(SKSize, SKSize, float)

public static bool CompareSize(SKSize a, SKSize b, float precision)

Parameters

a SKSize
b SKSize
precision float

Returns

bool

CompareVectors(Vector2, Vector2, float)

public static bool CompareVectors(Vector2 a, Vector2 b, float precision)

Parameters

a Vector2
b Vector2
precision float

Returns

bool

Contains(IView)

Determines whether the ICollection<T> contains a specific value.

public bool Contains(IView item)

Parameters

item IView

The object to locate in the ICollection<T>.

Returns

bool

true if item is found in the ICollection<T>; otherwise, false.

ContractPixelsRect(SKRect, float)

public static SKRect ContractPixelsRect(SKRect rect, float pixels)

Parameters

rect SKRect
pixels float

Returns

SKRect

ContractPixelsRect(SKRect, float, Thickness)

public static SKRect ContractPixelsRect(SKRect rect, float scale, Thickness amount)

Parameters

rect SKRect
scale float
amount Thickness

Returns

SKRect

CopyTo(IView[], int)

Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.

public void CopyTo(IView[] array, int arrayIndex)

Parameters

array IView[]

The one-dimensional Array that is the destination of the elements copied from ICollection<T>. The Array must have zero-based indexing.

arrayIndex int

The zero-based index in array at which copying begins.

Exceptions

ArgumentNullException

array is null.

ArgumentOutOfRangeException

arrayIndex is less than 0.

ArgumentException

The number of elements in the source ICollection<T> is greater than the available space from arrayIndex to the end of the destination array.

CreateClip(object, bool, SKPath)

Create this control clip for painting content. Pass arguments if you want to use some time-frozen data for painting at any time from any thread..

public virtual SKPath CreateClip(object arguments, bool usePosition, SKPath path = null)

Parameters

arguments object
usePosition bool
path SKPath

Returns

SKPath

CreateContentFromTemplate()

public virtual object CreateContentFromTemplate()

Returns

object

CreateDefaultContent()

protected virtual void CreateDefaultContent()

CreateGradient(SKRect, SkiaGradient)

public SKShader CreateGradient(SKRect destination, SkiaGradient gradient)

Parameters

destination SKRect
gradient SkiaGradient

Returns

SKShader

CreateHitRect()

This will be used for gesture detection, return s DrawingRect in bas, you could choose to override to expand etc..

public virtual SKRect CreateHitRect()

Returns

SKRect

CreateMeasureRequest(float, float, float)

todo use this for layout, actually this is used for measurement only . RenderingScale is set insde.

protected virtual MeasureRequest CreateMeasureRequest(float widthConstraint, float heightConstraint, float scale)

Parameters

widthConstraint float
heightConstraint float
scale float

Returns

MeasureRequest

CreateRenderedNode(SKRect, float)

public virtual VisualLayer CreateRenderedNode(SKRect destination, float scale)

Parameters

destination SKRect
scale float

Returns

VisualLayer

CreateRenderedObject(DrawingContext, SKRect, bool)

Technical optional method for some custom logic. Will create as SKImage or SKPicture (asOperations=true). WIll not affect current RenderObject property.

public CachedObject CreateRenderedObject(DrawingContext ctx, SKRect area, bool asOperations)

Parameters

ctx DrawingContext
area SKRect
asOperations bool

Returns

CachedObject

CreateRenderingObject(DrawingContext, SKRect, CachedObject, SkiaCacheType, Action<DrawingContext>)

public virtual CachedObject CreateRenderingObject(DrawingContext context, SKRect recordingArea, CachedObject reuseSurfaceFrom, SkiaCacheType usingCacheType, Action<DrawingContext> action)

Parameters

context DrawingContext
recordingArea SKRect
reuseSurfaceFrom CachedObject
usingCacheType SkiaCacheType
action Action<DrawingContext>

Returns

CachedObject

CreateRenderingObjectAndPaint(DrawingContext, SKRect, Action<DrawingContext>)

This is NOT calling FinalizeDraw()! parameter 'area' Usually is equal to DrawingRect

protected void CreateRenderingObjectAndPaint(DrawingContext context, SKRect recordingArea, Action<DrawingContext> action)

Parameters

context DrawingContext
recordingArea SKRect
action Action<DrawingContext>

CreateShadow(SkiaShadow, float)

public static SKImageFilter CreateShadow(SkiaShadow shadow, float scale)

Parameters

shadow SkiaShadow
scale float

Returns

SKImageFilter

CreateSurface(int, int, bool)

public SKSurface CreateSurface(int width, int height, bool isGpu)

Parameters

width int
height int
isGpu bool

Returns

SKSurface

CreateTransformationMatrix(SkiaDrawingContext, SKRect)

protected virtual void CreateTransformationMatrix(SkiaDrawingContext ctx, SKRect destination)

Parameters

ctx SkiaDrawingContext
destination SKRect

DefineAvailableSize(SKRect, float, float, float, bool)

Destination in PIXELS, requests in UNITS. This is affected by HorizontalFillRatio and VerticalFillRatio.

public virtual ScaledSize DefineAvailableSize(SKRect destination, float widthRequest, float heightRequest, float scale, bool useModifiers = true)

Parameters

destination SKRect
widthRequest float
heightRequest float
scale float
useModifiers bool

Returns

ScaledSize

DegreesToRadians(double)

public static double DegreesToRadians(double value)

Parameters

value double

Returns

double

DegreesToRadians(float)

public static float DegreesToRadians(float value)

Parameters

value float

Returns

float

DestroyRenderingObject()

public void DestroyRenderingObject()

DeviceUnitsToPixels(double)

public static int DeviceUnitsToPixels(double units)

Parameters

units double

Returns

int

Dispose()

Avoid setting parent to null before calling this, or set SuperView prop manually for proper cleanup of animations and gestures if any used

public void Dispose()

Dispose(bool)

Releases the unmanaged resources used by the ResourceManager and optionally releases the managed resources.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

DisposeChildren()

public virtual void DisposeChildren()

DisposeObject()

public void DisposeObject()

DisposeObject(IDisposable, string)

Dispose after some number of frames/with needed delay to avoid crashing if still used by GPU thread

public virtual void DisposeObject(IDisposable disposable, string caller = null)

Parameters

disposable IDisposable
caller string

Draw(DrawingContext)

protected virtual void Draw(DrawingContext context)

Parameters

context DrawingContext

DrawDirectInternal(DrawingContext, SKRect)

Not using cache

public virtual void DrawDirectInternal(DrawingContext context, SKRect drawingRect)

Parameters

context DrawingContext

context.Destination can be bigger than drawingRect

drawingRect SKRect

normally equal to DrawingRect

DrawPlaceholder(DrawingContext)

Called by ImageDoubleBuffered cache rendering when no cache is ready yet. Other controls might use this too to draw placeholders when result is not ready yet.

public virtual void DrawPlaceholder(DrawingContext context)

Parameters

context DrawingContext

DrawRenderObject(DrawingContext, CachedObject)

Drawing cache, applying clip and transforms as well

public virtual void DrawRenderObject(DrawingContext context, CachedObject cache)

Parameters

context DrawingContext
cache CachedObject

DrawRenderObject(DrawingContext, float, float, CachedObject)

Technical optional method for some custom logic. Actually used by SkiaMap only.

public void DrawRenderObject(DrawingContext ctx, float x, float y, CachedObject cache = null)

Parameters

ctx DrawingContext
x float
y float
cache CachedObject

DrawRenderObjectInternal(DrawingContext, CachedObject)

public virtual void DrawRenderObjectInternal(DrawingContext ctx, CachedObject cache)

Parameters

ctx DrawingContext
cache CachedObject

DrawUsingRenderObject(DrawingContext, float, float)

Returns true if had drawn.

public virtual bool DrawUsingRenderObject(DrawingContext context, float widthRequest, float heightRequest)

Parameters

context DrawingContext
widthRequest float
heightRequest float

Returns

bool

DrawViews(DrawingContext)

Base method will call RenderViewsList. Return number of drawn views.

protected virtual int DrawViews(DrawingContext context)

Parameters

context DrawingContext

Returns

int

DrawWithClipAndTransforms(DrawingContext, SKRect, bool, bool, Action<DrawingContext>)

public void DrawWithClipAndTransforms(DrawingContext ctx, SKRect transformsArea, bool useOpacity, bool useClipping, Action<DrawingContext> draw)

Parameters

ctx DrawingContext
transformsArea SKRect
useOpacity bool
useClipping bool
draw Action<DrawingContext>

ExecutePostAnimators(DrawingContext)

public void ExecutePostAnimators(DrawingContext context)

Parameters

context DrawingContext

ExpandPixelsRect(SKRect, float, Thickness)

public static SKRect ExpandPixelsRect(SKRect rect, float scale, Thickness amount)

Parameters

rect SKRect
scale float
amount Thickness

Returns

SKRect

FadeToAsync(double, float, Easing, CancellationTokenSource)

Fades the drawn view from the current Opacity to end, animator is reused if already running

public Task FadeToAsync(double end, float ms = 250, Easing easing = null, CancellationTokenSource cancel = null)

Parameters

end double
ms float
easing Easing
cancel CancellationTokenSource

Returns

Task

~SkiaControl()

Releases unmanaged resources before the object is reclaimed by garbage collection.

protected ~SkiaControl()

FinalizeDrawingWithRenderObject(DrawingContext)

Execute post drawing operations, like post-animators etc

protected void FinalizeDrawingWithRenderObject(DrawingContext context)

Parameters

context DrawingContext

FindRenderedNode(SkiaControl)

public VisualLayer? FindRenderedNode(SkiaControl control)

Parameters

control SkiaControl

Returns

VisualLayer

FindViewByTag(string)

public SkiaControl FindViewByTag(string tag)

Parameters

tag string

Returns

SkiaControl

FindView<TChild>()

public TChild FindView<TChild>() where TChild : SkiaControl

Returns

TChild

Type Parameters

TChild

FindView<TChild>(string)

public TChild FindView<TChild>(string tag) where TChild : SkiaControl

Parameters

tag string

Returns

TChild

Type Parameters

TChild

GenerateParentChain()

This actually used by SkiaMauiElement but could be used by other controls. Also might be useful for debugging purposes.

public VisualTreeChain GenerateParentChain()

Returns

VisualTreeChain

GestureIsInside(TouchActionEventArgs, float, float)

To detect if current location is inside Destination

public bool GestureIsInside(TouchActionEventArgs args, float offsetX = 0, float offsetY = 0)

Parameters

args TouchActionEventArgs
offsetX float
offsetY float

Returns

bool

GestureStartedInside(TouchActionEventArgs, float, float)

To detect if a gesture Start point was inside Destination

public bool GestureStartedInside(TouchActionEventArgs args, float offsetX = 0, float offsetY = 0)

Parameters

args TouchActionEventArgs
offsetX float
offsetY float

Returns

bool

GetAllMarginsInPixels(float)

public virtual Thickness GetAllMarginsInPixels(float scale)

Parameters

scale float

Returns

Thickness

GetAnimatorsManager()

public IAnimatorsManager GetAnimatorsManager()

Returns

IAnimatorsManager

GetCacheArea(SKRect)

Normally cache is recorded inside DrawingRect, but you might want to expand this to include shadows around, for example.

protected virtual SKRect GetCacheArea(SKRect value)

Parameters

value SKRect

Returns

SKRect

GetCacheRecordingArea(SKRect)

Used for the Operations cache type to record inside the changed area, if your control is not inside the DrawingRect due to transforms/translations. This is NOT changing the rendering object

protected virtual SKRect GetCacheRecordingArea(SKRect drawingRect)

Parameters

drawingRect SKRect

Returns

SKRect

GetContentSizeForAutosizeInPixels()

Override this if you need to adjust the measured ContentSize for the parent to adapt to it. For example SkiaShape overrides this to expand by adding the needed size for stroke.

protected virtual SKSize GetContentSizeForAutosizeInPixels()

Returns

SKSize

GetDensity()

public static float GetDensity()

Returns

float

GetDirectionType(Vector2, DirectionType, float)

public static DirectionType GetDirectionType(Vector2 velocity, DirectionType defaultDirection, float ratio)

Parameters

velocity Vector2
defaultDirection DirectionType
ratio float

Returns

DirectionType

GetDirectionType(Vector2, Vector2, float)

public static DirectionType GetDirectionType(Vector2 start, Vector2 end, float ratio)

Parameters

start Vector2
end Vector2
ratio float

Returns

DirectionType

GetDrawingRectForChildren(SKRect, double)

public SKRect GetDrawingRectForChildren(SKRect destination, double scale)

Parameters

destination SKRect
scale double

Returns

SKRect

GetDrawingRectWithMargins(SKRect, double)

public virtual SKRect GetDrawingRectWithMargins(SKRect destination, double scale)

Parameters

destination SKRect
scale double

Returns

SKRect

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<IView> GetEnumerator()

Returns

IEnumerator<IView>

An enumerator that can be used to iterate through the collection.

GetFuturePositionOffsetInPixels(bool, bool, bool)

public SKPoint GetFuturePositionOffsetInPixels(bool cacheOnly = false, bool ignoreCache = false, bool useTranslation = true)

Parameters

cacheOnly bool
ignoreCache bool
useTranslation bool

Returns

SKPoint

GetFuturePositionOnCanvas()

Absolute position in pixels before drawn.

public virtual SKPoint GetFuturePositionOnCanvas()

Returns

SKPoint

GetFuturePositionOnCanvasInPoints(bool)

Absolute position in points

public virtual SKPoint GetFuturePositionOnCanvasInPoints(bool useTranslation = true)

Parameters

useTranslation bool

Returns

SKPoint

GetGesturePositionInsideChild(SkiaControl, SkiaGesturesParameters, GestureEventProcessingInfo)

Returns the point in the local coordinate system of the direct child (relative to its Top/Left). Takes into account the current state of gesture processing (scroll offsets, etc), renders transforms and layout. Returns points (DIPs).

public virtual SKPoint GetGesturePositionInsideChild(SkiaControl child, SkiaGesturesParameters args, GestureEventProcessingInfo apply)

Parameters

child SkiaControl
args SkiaGesturesParameters
apply GestureEventProcessingInfo

Returns

SKPoint

GetHeightRequestPixelsWIthMargins(float)

public float GetHeightRequestPixelsWIthMargins(float scale)

Parameters

scale float

Returns

float

GetHitBoxOnCanvas()

public virtual SKRect GetHitBoxOnCanvas()

Returns

SKRect

GetMarginsInPixels(float)

public virtual Thickness GetMarginsInPixels(float scale)

Parameters

scale float

Returns

Thickness

GetMeasuringConstraints(MeasureRequest)

public virtual MeasuringConstraints GetMeasuringConstraints(MeasureRequest request)

Parameters

request MeasureRequest

Returns

MeasuringConstraints

GetMeasuringRectForChildren(float, float, double)

public virtual SKRect GetMeasuringRectForChildren(float widthConstraint, float heightConstraint, double scale)

Parameters

widthConstraint float
heightConstraint float
scale double

Returns

SKRect

GetNanoseconds()

public static long GetNanoseconds()

Returns

long

GetOffscreenRenderingAction()

public Action GetOffscreenRenderingAction()

Returns

Action

GetOffsetInsideControlInPixels(PointF, SKPoint)

public SKPoint GetOffsetInsideControlInPixels(PointF location, SKPoint childOffset)

Parameters

location PointF
childOffset SKPoint

Returns

SKPoint

GetOffsetInsideControlInPoints(PointF, SKPoint)

public SKPoint GetOffsetInsideControlInPoints(PointF location, SKPoint childOffset)

Parameters

location PointF
childOffset SKPoint

Returns

SKPoint

GetOnScreenVisibleArea(DrawingContext, Vector2)

For virtualization. For this method to be conditional we introduced the pixelsDestination parameter so that the Parent could return different visible areas upon context. Normally pass your current destination you are drawing into as this parameter.

public virtual ScaledRect GetOnScreenVisibleArea(DrawingContext context, Vector2 inflateByPixels = default)

Parameters

context DrawingContext
inflateByPixels Vector2

Returns

ScaledRect

GetOrderedSubviews(bool)

public virtual List<SkiaControl> GetOrderedSubviews(bool recalculate = false)

Parameters

recalculate bool

Returns

List<SkiaControl>

GetParentElement(IDrawnBase)

public static IDrawnBase GetParentElement(IDrawnBase control)

Parameters

control IDrawnBase

Returns

IDrawnBase

GetPositionOffsetInPixels(bool, bool, bool)

public SKPoint GetPositionOffsetInPixels(bool cacheOnly = false, bool ignoreCache = false, bool useTranslation = true)

Parameters

cacheOnly bool
ignoreCache bool
useTranslation bool

Returns

SKPoint

GetPositionOffsetInPoints()

public SKPoint GetPositionOffsetInPoints()

Returns

SKPoint

GetPositionOnCanvas()

Absolute position in pixels after drawn.

public virtual SKPoint GetPositionOnCanvas()

Returns

SKPoint

GetPositionOnCanvasInPoints()

Absolute position in points

public virtual SKPoint GetPositionOnCanvasInPoints()

Returns

SKPoint

GetRandomColor()

public static Color GetRandomColor()

Returns

Color

GetRenderingScaleFor(float)

public float GetRenderingScaleFor(float measure)

Parameters

measure float

Returns

float

GetRenderingScaleFor(float, float)

Returns rendering scale adapted for another output size, useful for offline rendering

public float GetRenderingScaleFor(float width, float height)

Parameters

width float
height float

Returns

float

GetSelfDrawingPosition()

Find drawing position for control accounting for all caches up the rendering tree.

public virtual SKPoint GetSelfDrawingPosition()

Returns

SKPoint

GetSizeInPoints(SKSize, float)

public static SKSize GetSizeInPoints(SKSize size, float scale)

Parameters

size SKSize
scale float

Returns

SKSize

GetSizeRequest(float, float, bool)

public virtual SKSize GetSizeRequest(float widthConstraint, float heightConstraint, bool insideLayout)

Parameters

widthConstraint float
heightConstraint float
insideLayout bool

Returns

SKSize

GetTopParentView()

Use Superview from public area

public virtual DrawnView GetTopParentView()

Returns

DrawnView

GetUnorderedSubviews(bool)

public virtual IReadOnlyList<SkiaControl> GetUnorderedSubviews(bool recalculate = false)

Parameters

recalculate bool

Returns

IReadOnlyList<SkiaControl>

GetVisualChildren()

Gets a readonly list of the element's visual children.

public virtual IReadOnlyList<IVisualTreeElement> GetVisualChildren()

Returns

IReadOnlyList<IVisualTreeElement>

A readonly list containing the element's visual children.

Remarks

Unless explicitly defined, an element's visual children will also be its logical children.

GetVisualParent()

Gets the element's visual parent.

public virtual IVisualTreeElement GetVisualParent()

Returns

IVisualTreeElement

The element's parent.

GetWidthRequestPixelsWIthMargins(float)

public float GetWidthRequestPixelsWIthMargins(float scale)

Parameters

scale float

Returns

float

HasPlatformClip()

protected bool HasPlatformClip()

Returns

bool

HitIsInside(float, float)

ISkiaGestureListener impl

public virtual bool HitIsInside(float x, float y)

Parameters

x float
y float

Returns

bool

IndexOf(IView)

Determines the index of a specific item in the IList<T>.

public int IndexOf(IView item)

Parameters

item IView

The object to locate in the IList<T>.

Returns

int

The index of item if found in the list; otherwise, -1.

InitializeDefaultContent(bool)

Always run this before applying any changes while measuring.

public virtual void InitializeDefaultContent(bool force = false)

Parameters

force bool

Insert(int, IView)

Inserts an item to the IList<T> at the specified index.

public void Insert(int index, IView item)

Parameters

index int

The zero-based index at which item should be inserted.

item IView

The object to insert into the IList<T>.

Exceptions

ArgumentOutOfRangeException

index is not a valid index in the IList<T>.

NotSupportedException

The IList<T> is read-only.

Invalidate()

Base calls InvalidateInternal and InvalidateParent

public virtual void Invalidate()

InvalidateByChild(SkiaControl)

To be able to fast track dirty children

public virtual void InvalidateByChild(SkiaControl child)

Parameters

child SkiaControl

InvalidateCache()

public virtual void InvalidateCache()

InvalidateCacheWithPrevious()

public virtual void InvalidateCacheWithPrevious()

InvalidateChildren(SkiaControl)

Will invoke InvalidateInternal on controls and subviews

protected virtual void InvalidateChildren(SkiaControl control)

Parameters

control SkiaControl

InvalidateChildrenTree()

public virtual void InvalidateChildrenTree()

InvalidateChildrenTree(SkiaControl)

Will invoke InvalidateInternal on controls and subviews

public virtual void InvalidateChildrenTree(SkiaControl control)

Parameters

control SkiaControl

InvalidateInternal()

Soft invalidation, without requiring update. So next time we try to draw this one it will recalc everything.

public virtual void InvalidateInternal()

InvalidateMeasure()

Marks the current measure of an element as invalidated.

protected override void InvalidateMeasure()

InvalidateMeasureInternal()

public virtual void InvalidateMeasureInternal()

InvalidateParent()

public virtual void InvalidateParent()

InvalidateParents()

If need the re-measure all parents because child-auto-size has changed

public void InvalidateParents()

InvalidateShadowPaint()

protected void InvalidateShadowPaint()

InvalidateViewport()

Indicated that wants to be re-measured without invalidating cache

public virtual void InvalidateViewport()

InvalidateViewsList()

public virtual void InvalidateViewsList()

InvalidateWithChildren()

public virtual void InvalidateWithChildren()

IsGestureForChild(ISkiaGestureListener, SKPoint)

public virtual bool IsGestureForChild(ISkiaGestureListener listener, SKPoint point)

Parameters

listener ISkiaGestureListener
point SKPoint

Returns

bool

IsGestureForChild(ISkiaGestureListener, float, float)

public virtual bool IsGestureForChild(ISkiaGestureListener listener, float x, float y)

Parameters

listener ISkiaGestureListener
x float
y float

Returns

bool

IsGestureForChild(SkiaControl, SkiaGesturesParameters)

public virtual bool IsGestureForChild(SkiaControl child, SkiaGesturesParameters args)

Parameters

child SkiaControl
args SkiaGesturesParameters

Returns

bool

IsGestureForChild(SkiaControlWithRect, SKPoint)

public virtual bool IsGestureForChild(SkiaControlWithRect child, SKPoint point)

Parameters

child SkiaControlWithRect
point SKPoint

Returns

bool

IsGestureInside(GestureEventProcessingInfo)

public bool IsGestureInside(GestureEventProcessingInfo apply)

Parameters

apply GestureEventProcessingInfo

Returns

bool

IsOne(double)

Avalonia: IsOne - Returns whether or not the double is "close" to 1. Same as AreClose(double, 1), but this is faster.

public static bool IsOne(double value)

Parameters

value double

The double to compare to 1.

Returns

bool

IsPixelInside(SKRect, float, float)

public bool IsPixelInside(SKRect rect, float x, float y)

Parameters

rect SKRect
x float
y float

Returns

bool

IsPixelInside(float, float)

Whether the pixel is inside Destination

public bool IsPixelInside(float x, float y)

Parameters

x float
y float

Returns

bool

IsPointInside(SKRect, float, float, float)

public bool IsPointInside(SKRect rect, float x, float y, float scale)

Parameters

rect SKRect
x float
y float
scale float

Returns

bool

IsPointInside(float, float, float)

Whether the point is inside Destination

public bool IsPointInside(float x, float y, float scale)

Parameters

x float
y float
scale float

Returns

bool

IsRenderObjectValid(SKSize, CachedObject)

public bool IsRenderObjectValid(SKSize size, CachedObject cache = null)

Parameters

size SKSize
cache CachedObject

Returns

bool

IsRootView()

public bool IsRootView()

Returns

bool

IsSimpleRectangle(SKPath)

public static bool IsSimpleRectangle(SKPath path)

Parameters

path SKPath

Returns

bool

IsVisibleInViewTree()

public virtual bool IsVisibleInViewTree()

Returns

bool

ItemTemplateChanged(BindableObject, object, object)

protected static void ItemTemplateChanged(BindableObject bindable, object oldvalue, object newvalue)

Parameters

bindable BindableObject
oldvalue object
newvalue object

Layout(DrawingContext, SKRect)

Helper on top of Measure +Arrange for an easy-use Input in PIXELS.

public void Layout(DrawingContext context, SKRect destinationPixels)

Parameters

context DrawingContext
destinationPixels SKRect

Layout(DrawingContext, int, int, int, int)

Helper on top of Measure +Arrange for an easy-use Input in PIXELS.

public void Layout(DrawingContext context, int left, int top, int right, int bottom)

Parameters

context DrawingContext
left int
top int
right int
bottom int

Layout(DrawingContext, float, float, float, float)

Helper on top of Measure +Arrange for an easy-use Input in PIXELS.

public void Layout(DrawingContext context, float left, float top, float right, float bottom)

Parameters

context DrawingContext
left float
top float
right float
bottom float

LinearGradientAngleToPoints(double)

public static (double X1, double Y1, double X2, double Y2) LinearGradientAngleToPoints(double direction)

Parameters

direction double

Returns

(double X1, double Y1, double X2, double Y2)

LockUpdate(bool)

public virtual void LockUpdate(bool value)

Parameters

value bool

Measure(float, float, float)

Main method for measuring, override OnMeasuring to plug-in.

public ScaledSize Measure(float widthConstraint, float heightConstraint, float scale)

Parameters

widthConstraint float
heightConstraint float
scale float

Returns

ScaledSize

MeasureAbsolute(SKRect, float)

Measure children inside absolute layout

public virtual ScaledSize MeasureAbsolute(SKRect rectForChildrenPixels, float scale)

Parameters

rectForChildrenPixels SKRect
scale float

Returns

ScaledSize

MeasureAbsoluteBase(SKRect, float)

Measure children inside absolute layout Base method, not aware of any views provider, not virtual, silly measuring Children.

protected virtual ScaledSize MeasureAbsoluteBase(SKRect rectForChildrenPixels, float scale)

Parameters

rectForChildrenPixels SKRect
scale float

Returns

ScaledSize

MeasureChild(SkiaControl, double, double, float)

PIXELS

public ScaledSize MeasureChild(SkiaControl child, double availableWidth, double availableHeight, float scale)

Parameters

child SkiaControl
availableWidth double
availableHeight double
scale float

Returns

ScaledSize

MeasureContent(IEnumerable<SkiaControl>, SKRect, float)

Measuring as absolute layout for passed children

protected virtual ScaledSize MeasureContent(IEnumerable<SkiaControl> children, SKRect rectForChildrenPixels, float scale)

Parameters

children IEnumerable<SkiaControl>
rectForChildrenPixels SKRect
scale float

Returns

ScaledSize

MeasureContentCore(IEnumerable<SkiaControl>, SKRect, float)

Core 3-pass measurement logic for absolute layouts with full FILL support

protected virtual ScaledSize MeasureContentCore(IEnumerable<SkiaControl> children, SKRect rectForChildrenPixels, float scale)

Parameters

children IEnumerable<SkiaControl>
rectForChildrenPixels SKRect
scale float

Returns

ScaledSize

MeasureInternal(MeasureRequest)

protected virtual ScaledSize MeasureInternal(MeasureRequest request)

Parameters

request MeasureRequest

Returns

ScaledSize

MeasureSelf(SKRect, float, float, float)

Self measuring, for top controls and those invalidated-redrawn when parents didn't re-measure them

protected virtual void MeasureSelf(SKRect destination, float widthRequest, float heightRequest, float scale)

Parameters

destination SKRect
widthRequest float
heightRequest float
scale float

NeedDraw(BindableObject, object, object)

Need to erase cache and draw from scratch

protected static void NeedDraw(BindableObject bindable, object oldvalue, object newvalue)

Parameters

bindable BindableObject
oldvalue object
newvalue object

NeedInvalidateMeasure(BindableObject, object, object)

Need to re-measure and then redraw from scratch

protected static void NeedInvalidateMeasure(BindableObject bindable, object oldvalue, object newvalue)

Parameters

bindable BindableObject
oldvalue object
newvalue object

NeedInvalidateViewport(BindableObject, object, object)

protected static void NeedInvalidateViewport(BindableObject bindable, object oldvalue, object newvalue)

Parameters

bindable BindableObject
oldvalue object
newvalue object

NeedRepaint(BindableObject, object, object)

Just make us repaint to apply new transforms etc keeping existing cache if any

protected static void NeedRepaint(BindableObject bindable, object oldvalue, object newvalue)

Parameters

bindable BindableObject
oldvalue object
newvalue object

NeedToMeasureSelf()

protected virtual bool NeedToMeasureSelf()

Returns

bool

NotValidPoint()

public SKPoint NotValidPoint()

Returns

SKPoint

OnAfterDrawing(DrawingContext)

protected virtual void OnAfterDrawing(DrawingContext context)

Parameters

context DrawingContext

OnBeforeDrawing(DrawingContext)

protected virtual void OnBeforeDrawing(DrawingContext context)

Parameters

context DrawingContext

OnBeforeMeasure()

public virtual void OnBeforeMeasure()

OnBindingContextChanged()

First Maui will apply bindings to your controls, then it would call OnBindingContextChanged, so beware on not to break bindings.

protected override void OnBindingContextChanged()

OnCacheCreated()

protected virtual void OnCacheCreated()

OnCacheDestroyed()

protected virtual void OnCacheDestroyed()

OnChildAdded(SkiaControl)

public virtual void OnChildAdded(SkiaControl child)

Parameters

child SkiaControl

OnChildAdded(Element)

Avoid slowing us down with MAUI internals

protected override void OnChildAdded(Element child)

Parameters

child Element

OnChildRemoved(SkiaControl)

public virtual void OnChildRemoved(SkiaControl child)

Parameters

child SkiaControl

OnChildRemoved(Element, int)

Avoid slowing us down with MAUI internals

protected override void OnChildRemoved(Element child, int oldLogicalIndex)

Parameters

child Element
oldLogicalIndex int

OnChildTapped(SkiaControl, SkiaGesturesParameters, GestureEventProcessingInfo)

Layout detected that child was tapped, base used to call callback ChildTapped

public virtual void OnChildTapped(SkiaControl child, SkiaGesturesParameters args, GestureEventProcessingInfo apply)

Parameters

child SkiaControl
args SkiaGesturesParameters
apply GestureEventProcessingInfo

OnChildrenChanged()

Happens when child was added or removed, will call Invalidate() in base

public virtual void OnChildrenChanged()

OnDisposing()

Base performs some cleanup actions with Superview

public virtual void OnDisposing()

OnDrawingSizeChanged()

protected virtual void OnDrawingSizeChanged()

OnFirstDrawn()

protected virtual void OnFirstDrawn()

OnFocusChanged(bool)

This will be called only for views registered at Superview.FocusedChild. The view must return true of false to indicate if it accepts focus.

public virtual bool OnFocusChanged(bool focus)

Parameters

focus bool

Returns

bool

OnHover(bool)

Will be called by the Canvas.

public virtual bool OnHover(bool state)

Parameters

state bool

Returns

bool

OnItemTemplateChanged()

public virtual void OnItemTemplateChanged()

OnLayoutChanged()

DrawingRect size changed

protected virtual void OnLayoutChanged()

OnLayoutPositionChanged()

DrawingRect location changed. This will not be called if OnLayoutChanged was invoked for this frame!

protected virtual void OnLayoutPositionChanged()

OnLayoutReady()

Layout was changed with dimensions above zero. Rather a helper method, can you more generic OnLayoutChanged().

protected virtual void OnLayoutReady()

OnLifecycleStateChanged(ControlLifecycleState)

protected virtual void OnLifecycleStateChanged(ControlLifecycleState state)

Parameters

state ControlLifecycleState

OnMeasured()

protected virtual void OnMeasured()

OnMeasuring(float, float, float)

Input in POINTS

public virtual ScaledSize OnMeasuring(float widthConstraint, float heightConstraint, float scale)

Parameters

widthConstraint float
heightConstraint float
scale float

Returns

ScaledSize

OnPaddingSet(Thickness)

Can override this for custom controls to apply padding differently from the default way

public virtual Thickness OnPaddingSet(Thickness padding)

Parameters

padding Thickness

Returns

Thickness

OnParentChanged(IDrawnBase, IDrawnBase)

public virtual void OnParentChanged(IDrawnBase newvalue, IDrawnBase oldvalue)

Parameters

newvalue IDrawnBase
oldvalue IDrawnBase

OnParentVisibilityChanged(bool)

todo override for templated skialayout to use ViewsProvider

public virtual void OnParentVisibilityChanged(bool newvalue)

Parameters

newvalue bool

OnPrintDebug()

public virtual void OnPrintDebug()

OnPropertyChanged(string)

Method that is called when a bound property is changed.

protected override void OnPropertyChanged(string propertyName = null)

Parameters

propertyName string

The name of the bound property that changed.

OnScaleChanged()

public virtual void OnScaleChanged()

OnSizeChanged()

protected virtual void OnSizeChanged()

OnSkiaGestureEvent(SkiaGesturesParameters, GestureEventProcessingInfo)

Will be called by Canvas. Please override ProcessGestures for handling gestures, this method is for internal use.

public ISkiaGestureListener OnSkiaGestureEvent(SkiaGesturesParameters args, GestureEventProcessingInfo apply)

Parameters

args SkiaGesturesParameters
apply GestureEventProcessingInfo

Returns

ISkiaGestureListener

OnSuperviewShouldRenderChanged(bool)

public virtual void OnSuperviewShouldRenderChanged(bool state)

Parameters

state bool

OnTriggerChanged()

public virtual void OnTriggerChanged()

OnViewAttached()

public virtual void OnViewAttached()

OnViewDetached()

public virtual void OnViewDetached()

OnVisibilityChanged(bool)

todo override for templated skialayout to use ViewsProvider

public virtual void OnVisibilityChanged(bool newvalue)

Parameters

newvalue bool

OnVisualEffectsChanged()

protected virtual void OnVisualEffectsChanged()

OnWillDisposeWithChildren()

The OnDisposing might come with a delay to avoid disposing resources at use. This method will be called without delay when Dispose() is invoked. Disposed will set to True and for Views their OnWillDisposeWithChildren will be called.

public virtual void OnWillDisposeWithChildren()

OptionalOnBeforeDrawing()

public virtual void OptionalOnBeforeDrawing()

Paint(DrawingContext)

This is the main drawing routine you should override to draw something. Base one paints background color inside DrawingRect that was defined by Arrange inside base.Draw. Pass arguments if you want to use some time-frozen data for painting at any time from any thread..

protected virtual void Paint(DrawingContext ctx)

Parameters

ctx DrawingContext

PaintTintBackground(SKCanvas, SKRect)

destination in pixels, if you see no Scale parameter

public virtual void PaintTintBackground(SKCanvas canvas, SKRect destination)

Parameters

canvas SKCanvas
destination SKRect

PaintWithEffects(DrawingContext)

public virtual void PaintWithEffects(DrawingContext ctx)

Parameters

ctx DrawingContext

PaintWithShadows(DrawingContext, Action)

protected virtual void PaintWithShadows(DrawingContext ctx, Action render)

Parameters

ctx DrawingContext
render Action

PauseAllAnimators()

public virtual void PauseAllAnimators()

PixelsToDeviceUnits(double)

public static double PixelsToDeviceUnits(double units)

Parameters

units double

Returns

double

PlayRippleAnimation(Color, double, double, bool)

Expecting input coordinates in POINTs and relative to control coordinates. Use GetOffsetInsideControlInPoints to help.

public void PlayRippleAnimation(Color color, double x, double y, bool removePrevious = true)

Parameters

color Color
x double
y double
removePrevious bool

PlayShimmerAnimation(Color, float, float, int, bool)

public void PlayShimmerAnimation(Color color, float shimmerWidth = 50, float shimmerAngle = 45, int speedMs = 1000, bool removePrevious = true)

Parameters

color Color
shimmerWidth float
shimmerAngle float
speedMs int
removePrevious bool

PointIsValid(SKPoint)

public bool PointIsValid(SKPoint point)

Parameters

point SKPoint

Returns

bool

PostArrange(SKRect, float, float, float)

protected virtual void PostArrange(SKRect destination, float widthRequest, float heightRequest, float scale)

Parameters

destination SKRect
widthRequest float
heightRequest float
scale float

PostDrawAction(Action)

Will be executed after canvas has finished drawing current frame. Useful when you need to account for all calculations and drawings to be finished.

public void PostDrawAction(Action action)

Parameters

action Action

PostponeInvalidation(string, Action)

Used for optimization process, for example, to avoid changing ItemSource several times before the first draw.

public void PostponeInvalidation(string key, Action action)

Parameters

key string
action Action

PreArrange(SKRect, float, float, float)

Returns false if should not render

public virtual bool PreArrange(SKRect destination, float widthRequest, float heightRequest, float scale)

Parameters

destination SKRect
widthRequest float
heightRequest float
scale float

Returns

bool

PrepareNode(DrawingContext, float, float)

public virtual VisualLayer? PrepareNode(DrawingContext context, float widthRequest, float heightRequest)

Parameters

context DrawingContext
widthRequest float
heightRequest float

Returns

VisualLayer

PrintDebug(string)

public void PrintDebug(string indent = "     ")

Parameters

indent string

ProcessGestures(SkiaGesturesParameters, GestureEventProcessingInfo)

public virtual ISkiaGestureListener ProcessGestures(SkiaGesturesParameters args, GestureEventProcessingInfo apply)

Parameters

args SkiaGesturesParameters
apply GestureEventProcessingInfo

Returns

ISkiaGestureListener

ProcessOffscreenCacheRenderingAsync()

public Task ProcessOffscreenCacheRenderingAsync()

Returns

Task

PropagateVisibilityChanged(bool)

protected virtual void PropagateVisibilityChanged(bool newvalue)

Parameters

newvalue bool

PushToOffscreenRendering(Action, CancellationToken)

public void PushToOffscreenRendering(Action action, CancellationToken cancel = default)

Parameters

action Action
cancel CancellationToken

RadiansToDegrees(double)

public static double RadiansToDegrees(double value)

Parameters

value double

Returns

double

RadiansToDegrees(float)

public static float RadiansToDegrees(float value)

Parameters

value float

Returns

float

RasterizeToCache(DrawingContext)

public void RasterizeToCache(DrawingContext ctx)

Parameters

ctx DrawingContext

RegisterAnimator(ISkiaAnimator)

public bool RegisterAnimator(ISkiaAnimator animator)

Parameters

animator ISkiaAnimator

Returns

bool

RegisterAnimator(ISkiaAnimator, IAnimatorsManager)

public void RegisterAnimator(ISkiaAnimator animator, IAnimatorsManager top)

Parameters

animator ISkiaAnimator
top IAnimatorsManager

RegisterGestureListener(ISkiaGestureListener)

public void RegisterGestureListener(ISkiaGestureListener gestureListener)

Parameters

gestureListener ISkiaGestureListener

RegisterGestureListenersTree(SkiaControl)

public virtual void RegisterGestureListenersTree(SkiaControl control)

Parameters

control SkiaControl

Remove(IView)

Removes the first occurrence of a specific object from the ICollection<T>.

public bool Remove(IView item)

Parameters

item IView

The object to remove from the ICollection<T>.

Returns

bool

true if item was successfully removed from the ICollection<T>; otherwise, false. This method also returns false if item is not found in the original ICollection<T>.

Exceptions

NotSupportedException

The ICollection<T> is read-only.

RemoveAt(int)

Removes the IList<T> item at the specified index.

public void RemoveAt(int index)

Parameters

index int

The zero-based index of the item to remove.

Exceptions

ArgumentOutOfRangeException

index is not a valid index in the IList<T>.

NotSupportedException

The IList<T> is read-only.

RemoveSubView(SkiaControl)

Directly removes a view from the control, without any layouting. Use this instead of Views.Remove() to avoid memory leaks etc

public virtual void RemoveSubView(SkiaControl control)

Parameters

control SkiaControl

Render(DrawingContext)

public virtual void Render(DrawingContext context)

Parameters

context DrawingContext

RenderViewsList(DrawingContext, IEnumerable<SkiaControl>)

Use to render Absolute layout. Base method is not supporting templates, override it to implement your logic. Returns number of drawn children.

protected virtual int RenderViewsList(DrawingContext context, IEnumerable<SkiaControl> skiaControls)

Parameters

context DrawingContext
skiaControls IEnumerable<SkiaControl>

Returns

int

Repaint()

Just make us repaint to apply new transforms etc

public virtual void Repaint()

ReportHotreloadChildAdded(SkiaControl)

public virtual void ReportHotreloadChildAdded(SkiaControl child)

Parameters

child SkiaControl

ReportHotreloadChildRemoved(SkiaControl)

public virtual void ReportHotreloadChildRemoved(SkiaControl control)

Parameters

control SkiaControl

RescaleAspect(float, float, SKRect, TransformAspect)

public static (float X, float Y) RescaleAspect(float width, float height, SKRect dest, TransformAspect stretch)

Parameters

width float
height float
dest SKRect
stretch TransformAspect

Returns

(float X, float Y)

ResumePausedAnimators()

public virtual void ResumePausedAnimators()

ReturnSurface(SKSurface)

public void ReturnSurface(SKSurface surface)

Parameters

surface SKSurface

RotateToAsync(double, uint, Easing, CancellationTokenSource)

Rotates the drawn view from the current rotation to end, animator is reused if already running

public Task RotateToAsync(double end, uint length = 250, Easing easing = null, CancellationTokenSource cancel = null)

Parameters

end double
length uint
easing Easing
cancel CancellationTokenSource

Returns

Task

RoundToPixels(SKRect)

Rounds SKRect coordinates to nearest pixel values

public static SKRect RoundToPixels(SKRect rect)

Parameters

rect SKRect

Returns

SKRect

RoundToPixels(float, float, float, float)

Rounds SKRect coordinates to nearest pixel values

public static SKRect RoundToPixels(float left, float top, float right, float bottom)

Parameters

left float
top float
right float
bottom float

Returns

SKRect

SafeAction(Action, long)

If attached to a SuperView and rendering is in progress will run before drawing it. Run now otherwise. if key is not null will replace existing if any to void running different action with same key in same frame.

public void SafeAction(Action action, long key = -1)

Parameters

action Action
key long

ScaleToAsync(double, double, float, Easing, CancellationTokenSource)

Scales the drawn view from the current Scale to x,y, animator is reused if already running

public Task ScaleToAsync(double x, double y, float length = 250, Easing easing = null, CancellationTokenSource cancel = null)

Parameters

x double
y double
length float
easing Easing
cancel CancellationTokenSource

Returns

Task

SendOnMeasured()

public virtual void SendOnMeasured()

SendTapped(object, SkiaGesturesParameters, GestureEventProcessingInfo, bool)

If Tapped handler was defined, activates it and return true of false it was defined.

protected bool SendTapped(object listener, SkiaGesturesParameters args, GestureEventProcessingInfo apply, bool useMainThread)

Parameters

listener object
args SkiaGesturesParameters
apply GestureEventProcessingInfo
useMainThread bool

Returns

bool

SendVisibilityChanged()

public void SendVisibilityChanged()

SetChildren(IEnumerable<SkiaControl>)

public virtual void SetChildren(IEnumerable<SkiaControl> views)

Parameters

views IEnumerable<SkiaControl>

SetChildrenAsParameters(params SkiaControl[])

Just a helper to pass children one by one comma separated instead of using a list

public void SetChildrenAsParameters(params SkiaControl[] children)

Parameters

children SkiaControl[]

SetDefaultContentSize(double, double)

protected virtual void SetDefaultContentSize(double width, double height)

Parameters

width double
height double

SetDefaultMinimumContentSize(double, double)

protected virtual void SetDefaultMinimumContentSize(double width, double height)

Parameters

width double
height double

SetHover(bool)

For internat custom logic, use IsHovered for usual use.

protected virtual void SetHover(bool state)

Parameters

state bool

SetInheritedBindingContext(object)

This is to be called by layouts to propagate their binding context to children. By overriding this method any child could deny a new context or use any other custom logic. To force new context for child parent would set child's BindingContext directly skipping the use of this method.

public virtual void SetInheritedBindingContext(object context)

Parameters

context object

SetMeasured(float, float, bool, bool, float)

Parameters in PIXELS. sets IsLayoutDirty = true;

protected virtual ScaledSize SetMeasured(float width, float height, bool widthCut, bool heightCut, float scale)

Parameters

width float
height float
widthCut bool
heightCut bool
scale float

Returns

ScaledSize

SetMeasuredAdaptToContentSize(MeasuringConstraints, float)

public virtual ScaledSize SetMeasuredAdaptToContentSize(MeasuringConstraints constraints, float scale)

Parameters

constraints MeasuringConstraints
scale float

Returns

ScaledSize

SetMeasuredAsEmpty(float)

protected virtual ScaledSize SetMeasuredAsEmpty(float scale)

Parameters

scale float

Returns

ScaledSize

SetParent(IDrawnBase)

public virtual void SetParent(IDrawnBase parent)

Parameters

parent IDrawnBase

SetPropertyValue(BindableProperty, object)

public virtual void SetPropertyValue(BindableProperty property, object value)

Parameters

property BindableProperty
value object

SetRenderingTree(List<SkiaControlWithRect>)

public virtual void SetRenderingTree(List<SkiaControlWithRect> tree)

Parameters

tree List<SkiaControlWithRect>

SetSuperview(DrawnView)

Manually sets Superview to this control and its children

public void SetSuperview(DrawnView view)

Parameters

view DrawnView

SetVisualTransform(VisualTransform)

Comes after all drawn, actually used by SkiaMauiElement only

public virtual void SetVisualTransform(VisualTransform transform)

Parameters

transform VisualTransform

SetupBackgroundPaint(SKPaint, SKRect)

Applies Background and BackgroundColor properties to paint inside destination. Returns false if there is nothing to paint painted.

protected virtual bool SetupBackgroundPaint(SKPaint paint, SKRect destination)

Parameters

paint SKPaint
destination SKRect

Returns

bool

SetupGradient(SKPaint, SkiaGradient, SKRect)

Creates Shader for gradient and sets it to passed SKPaint along with BlendMode

public bool SetupGradient(SKPaint paint, SkiaGradient gradient, SKRect destination)

Parameters

paint SKPaint
gradient SkiaGradient
destination SKRect

Returns

bool

SetupGradient(SKPaint, SkiaGradient, SKRect, ref SKShader, ref int, ref SKRect)

Caching overload: rebuilds the shader only when the gradient version or destination rect has changed since the last call. The caller owns the cached shader and must dispose it in their OnDisposing(). Passing gradient=null disposes and clears the cache.

public bool SetupGradient(SKPaint paint, SkiaGradient gradient, SKRect destination, ref SKShader cachedShader, ref int cachedVersion, ref SKRect cachedRect)

Parameters

paint SKPaint
gradient SkiaGradient
destination SKRect
cachedShader SKShader
cachedVersion int
cachedRect SKRect

Returns

bool

SetupShadow(SKPaint, SkiaShadow, float)

Creates and sets an ImageFilter for SKPaint

public bool SetupShadow(SKPaint paint, SkiaShadow shadow, float scale)

Parameters

paint SKPaint
shadow SkiaShadow
scale float

Returns

bool

SmartMax(float, float)

protected static float SmartMax(float a, float b)

Parameters

a float
b float

Returns

float

SmartMin(float, float)

protected static float SmartMin(float a, float b)

Parameters

a float
b float

Returns

float

SnapPointToPixel(SKPoint, double)

public static SKPoint SnapPointToPixel(SKPoint point, double scale)

Parameters

point SKPoint
scale double

Returns

SKPoint

SnapRectCenter(SKRect, float)

public static SKPoint SnapRectCenter(SKRect rect, float scale)

Parameters

rect SKRect
scale float

Returns

SKPoint

SnapRectToPixels(SKRect, float)

public static SKRect SnapRectToPixels(SKRect rect, float scale)

Parameters

rect SKRect
scale float

Returns

SKRect

SnapSizeToPixel(SKSize, double)

public static SKPoint SnapSizeToPixel(SKSize point, double scale)

Parameters

point SKSize
scale double

Returns

SKPoint

SnapToPixel(double, double)

public static float SnapToPixel(double point, double scale)

Parameters

point double
scale double

Returns

float

StopAnimations()

public virtual void StopAnimations()

StreamFromString(string)

public static MemoryStream StreamFromString(string value)

Parameters

value string

Returns

MemoryStream

SuperViewChanged()

public virtual void SuperViewChanged()

ThrowIfDisposed()

Throws an ObjectDisposedException if this object has been disposed.

protected void ThrowIfDisposed()

TrackChildAsDirty(SkiaControl)

public virtual void TrackChildAsDirty(SkiaControl child)

Parameters

child SkiaControl

TransformPointToLocalSpace(SKPoint)

public SKPoint TransformPointToLocalSpace(SKPoint pointInParentSpace)

Parameters

pointInParentSpace SKPoint

Returns

SKPoint

TranslateInputCoords(SKPoint, bool)

Use this to consume gestures in your control only, do not use result for passing gestures below

public virtual SKPoint TranslateInputCoords(SKPoint childOffset, bool accountForCache = true)

Parameters

childOffset SKPoint
accountForCache bool

Returns

SKPoint

TranslateInputDirectOffsetToPoints(PointF, SKPoint)

public virtual SKPoint TranslateInputDirectOffsetToPoints(PointF location, SKPoint childOffsetDirect)

Parameters

location PointF
childOffsetDirect SKPoint

Returns

SKPoint

TranslateInputOffsetToPixels(PointF, SKPoint)

public virtual SKPoint TranslateInputOffsetToPixels(PointF location, SKPoint childOffset)

Parameters

location PointF
childOffset SKPoint

Returns

SKPoint

TranslateToAsync(double, double, float, Easing, CancellationTokenSource)

Translates the drawn view from the current position to x,y, animator is reused if already running

public Task TranslateToAsync(double x, double y, float length = 250, Easing easing = null, CancellationTokenSource cancel = null)

Parameters

x double
y double
length float
easing Easing
cancel CancellationTokenSource

Returns

Task

UnlockUpdate()

public void UnlockUpdate()

UnregisterAllAnimatorsByType(Type)

public IEnumerable<ISkiaAnimator> UnregisterAllAnimatorsByType(Type type)

Parameters

type Type

Returns

IEnumerable<ISkiaAnimator>

UnregisterAnimator(Guid)

public void UnregisterAnimator(Guid uid)

Parameters

uid Guid

UnregisterGestureListener(ISkiaGestureListener)

public void UnregisterGestureListener(ISkiaGestureListener gestureListener)

Parameters

gestureListener ISkiaGestureListener

UnregisterGestureListenersTree(SkiaControl)

public virtual void UnregisterGestureListenersTree(SkiaControl control)

Parameters

control SkiaControl

Update()

Main method to invalidate cache and invoke rendering

public virtual void Update()

UpdateByChild(SkiaControl)

To track dirty area when Updating parent

public virtual void UpdateByChild(SkiaControl child)

Parameters

child SkiaControl

UpdateInternal()

protected virtual void UpdateInternal()

UpdatePlatformShadow()

protected void UpdatePlatformShadow()

UpdateSizeRequest()

Calculates SizeRequest, Margins etc

public virtual void UpdateSizeRequest()

UseRenderingObject(DrawingContext, SKRect)

protected virtual bool UseRenderingObject(DrawingContext context, SKRect recordArea)

Parameters

context DrawingContext
recordArea SKRect

Returns

bool

Events

ApplyingBindingContext

public event EventHandler ApplyingBindingContext

Event Type

EventHandler

ChildTapped

WIll be called if a child implements ISkiaGestureListener and was Tapped. If this is set then the Tapped gesture will be consumed by this control after passing it to child.

public event EventHandler<ControlTappedEventArgs> ChildTapped

Event Type

EventHandler<ControlTappedEventArgs>

ConsumeGestures

Gestures event handler for fast access. To mark a gesture as consumed set e.Consumed to true inside a synchronous (!) event handler. Can also use code-behind ProcessGestures override for more control.

public event EventHandler<SkiaGesturesInfo> ConsumeGestures

Event Type

EventHandler<SkiaGesturesInfo>

CreatedCache

public event EventHandler<CachedObject> CreatedCache

Event Type

EventHandler<CachedObject>

Destroyed

Lifecycle event

public event EventHandler Destroyed

Event Type

EventHandler

Disposing

public event EventHandler Disposing

Event Type

EventHandler

Initialized

Lifecycle event

public event EventHandler Initialized

Event Type

EventHandler

LayoutIsReady

public event EventHandler LayoutIsReady

Event Type

EventHandler

Measured

UNITS

public event EventHandler<ScaledSize> Measured

Event Type

EventHandler<ScaledSize>

ParentChanged

public event EventHandler<IDrawnBase> ParentChanged

Event Type

EventHandler<IDrawnBase>

ParentVisibilityChanged

public event EventHandler<bool> ParentVisibilityChanged

Event Type

EventHandler<bool>

Rendered

public event EventHandler Rendered

Event Type

EventHandler

Tapped

Fast usage event handler to handle taps. For more control over gestures use AddGestures or code-behind ProcessGestures override. If this is set then the Tapped gesture will be consumed by this control without alternatives.

public event EventHandler<ControlTappedEventArgs> Tapped

Event Type

EventHandler<ControlTappedEventArgs>

Updated

Triggered by Update method

public event EventHandler Updated

Event Type

EventHandler

VisibilityChanged

public event EventHandler<bool> VisibilityChanged

Event Type

EventHandler<bool>

WasFirstTimeDrawn

public event EventHandler WasFirstTimeDrawn

Event Type

EventHandler