Table of Contents

Class VirtualScroll

Namespace
DrawnUi.Draw
Assembly
DrawnUi.Maui.dll

this control gets a view and draws it on a virtual scrolling plane

public class VirtualScroll : SkiaScroll, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IVisualElementController, IElementController, IView, ITransform, IElement, IVisualTreeElement, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, IHasAfterEffects, ISkiaControl, IDrawnBase, ICanBeUpdatedWithContext, ICanBeUpdated, ISkiaDisposable, IDisposable, ISkiaGestureListener, IDefinesViewport, IWithContent
Inheritance
VirtualScroll
Implements
Derived
Inherited Members
Extension Methods

Constructors

VirtualScroll()

public VirtualScroll()

Properties

IsContentActive

protected override bool IsContentActive { get; }

Property Value

bool

UseVirtual

public override bool UseVirtual { get; }

Property Value

bool

Methods

GetMeasuredView(int, SKRect, float)

Returns a view for a specific index. Actually used for virtual scroll.

protected virtual SkiaLayout GetMeasuredView(int index, SKRect destination, float scale)

Parameters

index int
destination SKRect
scale float

Returns

SkiaLayout

OnMeasured()

protected override void OnMeasured()

PositionViewport(SKRect, SKPoint, float, float, bool)

Input offset parameters in PIXELS. This is called inside Draw, only if need reposition viewport. Here we can construct anything according current offset before painting. Creates a valid ViewportRect inside.

protected override bool PositionViewport(SKRect destination, SKPoint offsetPixels, float viewportScale, float scale, bool forceSyncOffsets)

Parameters

destination SKRect
offsetPixels SKPoint
viewportScale float
scale float
forceSyncOffsets bool

Returns

bool

Whether we changed viewport and cache changed

SetContentSize()

protected virtual void SetContentSize()

SetDetectIndexChildPoint(RelativePositionType)

protected override void SetDetectIndexChildPoint(RelativePositionType option = RelativePositionType.Start)

Parameters

option RelativePositionType