Class SkiaLayout
public class SkiaLayout : SkiaControl, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IVisualElementController, IElementController, IView, ITransform, IElement, IVisualTreeElement, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISkiaGestureListener, IHasAfterEffects, ISkiaDisposable, ISkiaGridLayout, ISkiaLayout, ISkiaControl, IDrawnBase, ICanBeUpdatedWithContext, ICanBeUpdated, ILayoutInsideViewport, IInsideViewport, IVisibilityAware, IDisposable
- Inheritance
-
SkiaLayout
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
SkiaLayout()
public SkiaLayout()
Fields
ColumnDefinitionsProperty
public static readonly BindableProperty ColumnDefinitionsProperty
Field Value
ColumnSpacingProperty
public static readonly BindableProperty ColumnSpacingProperty
Field Value
DefaultColumnDefinitionProperty
public static readonly BindableProperty DefaultColumnDefinitionProperty
Field Value
DefaultRowDefinitionProperty
public static readonly BindableProperty DefaultRowDefinitionProperty
Field Value
DynamicColumnsProperty
public static readonly BindableProperty DynamicColumnsProperty
Field Value
EmptyViewProperty
public static readonly BindableProperty EmptyViewProperty
Field Value
GridStructure
public SkiaLayout.SkiaGridStructure GridStructure
Field Value
GridStructureMeasured
public SkiaLayout.SkiaGridStructure GridStructureMeasured
Field Value
InvertProperty
public static readonly BindableProperty InvertProperty
Field Value
ItemTemplatePoolSizeProperty
public static readonly BindableProperty ItemTemplatePoolSizeProperty
Field Value
ItemsSourceProperty
public static readonly BindableProperty ItemsSourceProperty
Field Value
LineBreaks
protected List<int> LineBreaks
Field Value
MeasureItemsStrategyProperty
public static readonly BindableProperty MeasureItemsStrategyProperty
Field Value
MeasureStamp
protected long MeasureStamp
Field Value
RecyclingBufferProperty
public static readonly BindableProperty RecyclingBufferProperty
Field Value
RecyclingTemplateProperty
public static readonly BindableProperty RecyclingTemplateProperty
Field Value
ReserveTemplatesProperty
public static readonly BindableProperty ReserveTemplatesProperty
Field Value
RowDefinitionsProperty
public static readonly BindableProperty RowDefinitionsProperty
Field Value
RowSpacingProperty
public static readonly BindableProperty RowSpacingProperty
Field Value
SplitAlignProperty
public static readonly BindableProperty SplitAlignProperty
Field Value
SplitProperty
public static readonly BindableProperty SplitProperty
Field Value
SplitSpaceProperty
public static readonly BindableProperty SplitSpaceProperty
Field Value
TemplatedFooterProperty
public static readonly BindableProperty TemplatedFooterProperty
Field Value
TemplatedHeaderProperty
public static readonly BindableProperty TemplatedHeaderProperty
Field Value
TypeProperty
public static readonly BindableProperty TypeProperty
Field Value
WillDrawFromFreshItemssSource
protected long WillDrawFromFreshItemssSource
Field Value
WillMeasureFromFreshItemssSource
protected bool WillMeasureFromFreshItemssSource
Field Value
_emptyView
protected SkiaControl _emptyView
Field Value
_lockTemplates
protected readonly object _lockTemplates
Field Value
lockMeasureLayout
protected object lockMeasureLayout
Field Value
templatesInvalidated
protected bool templatesInvalidated
Field Value
Properties
ApplyNewItemsSource
public bool ApplyNewItemsSource { get; set; }
Property Value
BackgroundMeasurementProgress
public int BackgroundMeasurementProgress { get; }
Property Value
ChildrenFactory
public ViewsAdapter ChildrenFactory { get; protected set; }
Property Value
ChildrenGrid
protected List<ISkiaControl> ChildrenGrid { get; set; }
Property Value
ColumnDefinitions
[TypeConverter(typeof(ColumnDefinitionCollectionTypeConverter))]
public ColumnDefinitionCollection ColumnDefinitions { get; set; }
Property Value
ColumnSpacing
Gets the amount of space left between columns in the GridLayout.
public double ColumnSpacing { get; set; }
Property Value
DebugString
public override string DebugString { get; }
Property Value
DefaultColumnDefinition
Will use this to create a missing but required ColumnDefinition
[TypeConverter(typeof(ColumnDefinitionTypeConverter))]
public ColumnDefinition DefaultColumnDefinition { get; set; }
Property Value
DefaultRowDefinition
Will use this to create a missing but required RowDefinition
[TypeConverter(typeof(RowDefinitionTypeConverter))]
public RowDefinition DefaultRowDefinition { get; set; }
Property Value
DynamicColumns
If true, will not create additional columns to match SplitMax if there are less real columns, and take additional space for drawing
public bool DynamicColumns { get; set; }
Property Value
EmptyView
public SkiaControl EmptyView { get; set; }
Property Value
EstimatedTotalItems
public int EstimatedTotalItems { get; }
Property Value
FirstMeasuredIndex
public int FirstMeasuredIndex { get; protected set; }
Property Value
FirstVisibleIndex
public int FirstVisibleIndex { get; protected set; }
Property Value
InvalidatedChildren
Will be modified by InvalidateByChild
protected HashSet<SkiaControl> InvalidatedChildren { get; set; }
Property Value
InvalidatedChildrenInternal
Will use this when drawing
protected HashSet<SkiaControl> InvalidatedChildrenInternal { get; set; }
Property Value
Invert
Layouts can use this property for custom logic appropriate to layout type.
public bool Invert { get; set; }
Property Value
IsBackgroundMeasuring
public bool IsBackgroundMeasuring { get; }
Property Value
IsEmpty
public bool IsEmpty { get; set; }
Property Value
IsStack
Column/Row/Stack
public bool IsStack { get; }
Property Value
IsTemplated
public override bool IsTemplated { get; }
Property Value
ItemTemplatePoolSize
Default is -1, the number od template instances will not be less than data collection count. You can manually set to ta specific number to fill your viewport etc. Beware that if you set this to a number that will not be enough to fill the viewport binding contexts will contasntly be changing triggering screen update.
public int ItemTemplatePoolSize { get; set; }
Property Value
ItemsSource
public IList ItemsSource { get; set; }
Property Value
LastMeasuredIndex
public int LastMeasuredIndex { get; protected set; }
Property Value
LastVisibleIndex
public int LastVisibleIndex { get; protected set; }
Property Value
LatestMeasuredStackStructure
public LayoutStructure LatestMeasuredStackStructure { get; }
Property Value
LatestStackStructure
public LayoutStructure LatestStackStructure { get; }
Property Value
MeasureItemsStrategy
public MeasuringStrategy MeasureItemsStrategy { get; set; }
Property Value
MeasuredItemsPercentage
Percentage of items that have been measured (0.0 to 1.0)
protected float MeasuredItemsPercentage { get; }
Property Value
NeedMeasure
public override bool NeedMeasure { get; set; }
Property Value
RecyclingBuffer
Extra buffer zone for avoiding recycling
Default is 500pts - increase for less jaggy scroll, decrease for more memory efficiency
public double RecyclingBuffer { get; set; }
Property Value
RecyclingTemplate
In case of ItemsSource+ItemTemplate set will define should we reuse already created views: hidden items views will be reused for currently visible items on screen. If set to true inside a SkiaScrollLooped will cause it to redraw constantly even when idle because of the looped scroll mechanics.
public RecyclingTemplate RecyclingTemplate { get; set; }
Property Value
ReserveTemplates
For recycled cells: Default is 2, how many item templates above visible in viewport we must reserve in pool.
public int ReserveTemplates { get; set; }
Property Value
RowDefinitions
[TypeConverter(typeof(RowDefinitionCollectionTypeConverter))]
public RowDefinitionCollection RowDefinitions { get; set; }
Property Value
RowSpacing
Gets the amount of space left between rows in the GridLayout.
public double RowSpacing { get; set; }
Property Value
ShouldInvalidateByChildren
public override bool ShouldInvalidateByChildren { get; }
Property Value
Split
For Wrap number of columns/rows to split into, If 0 will use auto, if 1+ will have 1+ columns.
public int Split { get; set; }
Property Value
SplitAlign
Whether should keep same column width among rows
public bool SplitAlign { get; set; }
Property Value
SplitSpace
How to distribute free space between children TODO
public SpaceDistribution SplitSpace { get; set; }
Property Value
StackStructure
Used for StackLayout (Stack, Row) kind of layout
public LayoutStructure StackStructure { get; set; }
Property Value
StackStructureMeasured
When measuring we set this, and it will be swapped with StackStructure upon drawing so we don't affect the drawing if measuring in background.
public LayoutStructure StackStructureMeasured { get; set; }
Property Value
TemplatedFooter
Kind of BindableLayout.DrawnTemplate
public SkiaControl TemplatedFooter { get; set; }
Property Value
TemplatedHeader
Kind of BindableLayout.DrawnTemplate
public SkiaControl TemplatedHeader { get; set; }
Property Value
TotalMeasuredItems
public int TotalMeasuredItems { get; }
Property Value
Type
public LayoutType Type { get; set; }
Property Value
ViewportWasChanged
protected bool ViewportWasChanged { get; set; }
Property Value
Methods
ActualizeSubviews()
public virtual void ActualizeSubviews()
ApplyBindingContext()
public override void ApplyBindingContext()
ApplyIsEmpty(bool)
protected virtual void ApplyIsEmpty(bool value)
Parameters
valuebool
ApplyItemsSource()
Invalidate and re-apply ItemsSource
public virtual void ApplyItemsSource()
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 override void ApplyMeasureResult()
ApplyResetChange()
Applies Reset changes to StackStructure
protected void ApplyResetChange()
ApplyStructureChanges()
Applies all pending structure changes to StackStructure - called from rendering pipeline
public void ApplyStructureChanges()
BreakLine()
public void BreakLine()
BuildGridLayout(SKSize)
protected void BuildGridLayout(SKSize constraints)
Parameters
constraintsSKSize
CancelBackgroundMeasurement()
Cancels any ongoing background measurement
public void CancelBackgroundMeasurement()
CheckAndSetupIfEmpty()
protected virtual bool CheckAndSetupIfEmpty()
Returns
Clear()
public void Clear()
CreateTemplatesInBackground()
protected Task CreateTemplatesInBackground()
Returns
Draw(DrawingContext)
protected override void Draw(DrawingContext context)
Parameters
contextDrawingContext
DrawChild(DrawingContext, ISkiaControl)
protected virtual bool DrawChild(DrawingContext ctx, ISkiaControl child)
Parameters
ctxDrawingContextchildISkiaControl
Returns
DrawChildrenGrid(DrawingContext)
Returns number of drawn children
protected virtual int DrawChildrenGrid(DrawingContext context)
Parameters
contextDrawingContext
Returns
DrawList(DrawingContext, LayoutStructure)
Renders Templated Column/Row todo in some cases..
protected virtual int DrawList(DrawingContext ctx, LayoutStructure structure)
Parameters
ctxDrawingContextstructureLayoutStructure
Returns
DrawRenderObject(DrawingContext, CachedObject)
Todo where is this used i forgot completely
public override void DrawRenderObject(DrawingContext context, CachedObject cache)
Parameters
contextDrawingContextcacheCachedObject
DrawStack(DrawingContext, LayoutStructure)
Renders stack/wrap layout. Returns number of drawn children.
protected virtual int DrawStack(DrawingContext ctx, LayoutStructure structure)
Parameters
ctxDrawingContextstructureLayoutStructure
Returns
DrawViews(DrawingContext)
Base method will call RenderViewsList. Return number of drawn views.
protected override int DrawViews(DrawingContext context)
Parameters
contextDrawingContext
Returns
GetCacheDebugInfo()
Get debug information about cached views
public string GetCacheDebugInfo()
Returns
GetChildAt(float, float)
public SkiaControl GetChildAt(float x, float y)
Parameters
Returns
GetChildIndexAt(SKPoint)
The point here is the position inside parent, can be offscreen
public ContainsPointResult GetChildIndexAt(SKPoint point)
Parameters
pointSKPoint
Returns
GetChildRect(ISkiaControl)
public SKRect GetChildRect(ISkiaControl child)
Parameters
childISkiaControl
Returns
GetChildRect(int)
public SKRect GetChildRect(int index)
Parameters
indexint
Returns
GetColumn(BindableObject)
Gets the column of the child element.
public int GetColumn(BindableObject bindable)
Parameters
bindableBindableObject
Returns
- int
The column that the child element is in.
GetColumnSpan(BindableObject)
Gets the row span of the child element.
public int GetColumnSpan(BindableObject bindable)
Parameters
bindableBindableObject
Returns
- int
The row that the child element is in.
GetEstimatedContentSize(float)
Gets estimated total content size for virtualized lists with unmeasured items
public ScaledSize GetEstimatedContentSize(float scale)
Parameters
scalefloat
Returns
GetMeasuredContentEnd()
public double GetMeasuredContentEnd()
Returns
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 override ScaledRect GetOnScreenVisibleArea(DrawingContext context, Vector2 inflateByPixels = default)
Parameters
contextDrawingContextinflateByPixelsVector2
Returns
GetOrderedSubviews(bool)
public override List<SkiaControl> GetOrderedSubviews(bool recalculate = false)
Parameters
recalculatebool
Returns
GetRow(BindableObject)
Gets the row of the child element.
public int GetRow(BindableObject bindable)
Parameters
bindableBindableObject
Returns
- int
An integer that represents the row in which the item will appear.
GetRowSpan(BindableObject)
Gets the row span of the child element.
public int GetRowSpan(BindableObject bindable)
Parameters
bindableBindableObject
Returns
- int
The row that the child element is in.
GetSizeKey(SKSize)
public int GetSizeKey(SKSize size)
Parameters
sizeSKSize
Returns
GetSpacingForIndex(int, float)
protected float GetSpacingForIndex(int forIndex, float scale)
Parameters
Returns
GetStackChildDrawRect(int, float, float, ControlInStack)
protected virtual SKRect GetStackChildDrawRect(int index, float x, float y, ControlInStack cell)
Parameters
indexintxfloatyfloatcellControlInStack
Returns
GetTemplatesPoolLimit()
protected virtual int GetTemplatesPoolLimit()
Returns
GetTemplatesPoolPrefill()
protected virtual int GetTemplatesPoolPrefill()
Returns
GetVisibleChildIndexAt(SKPoint)
The point here is the rendering location, always on screen
public virtual ContainsPointResult GetVisibleChildIndexAt(SKPoint point)
Parameters
pointSKPoint
Returns
GetVisualChildren()
For Xaml HotReload. This is semetimes not called when we add and remove views.
public override IReadOnlyList<IVisualTreeElement> GetVisualChildren()
Returns
HandleCollectionChangeWithStructurePreservation(NotifyCollectionChangedEventArgs)
Handles collection changes while preserving existing measurement structure
protected virtual void HandleCollectionChangeWithStructurePreservation(NotifyCollectionChangedEventArgs args)
Parameters
HandleStructurePreservingAdd(NotifyCollectionChangedEventArgs)
Handles Add collection changes while preserving existing structure
protected virtual void HandleStructurePreservingAdd(NotifyCollectionChangedEventArgs args)
Parameters
HandleStructurePreservingMove(NotifyCollectionChangedEventArgs)
Handles Move collection changes while preserving existing structure
protected virtual void HandleStructurePreservingMove(NotifyCollectionChangedEventArgs args)
Parameters
HandleStructurePreservingRemove(NotifyCollectionChangedEventArgs)
Handles Remove collection changes while preserving existing structure
protected virtual void HandleStructurePreservingRemove(NotifyCollectionChangedEventArgs args)
Parameters
HandleStructurePreservingReplace(NotifyCollectionChangedEventArgs)
Handles Replace collection changes while preserving existing structure
protected virtual void HandleStructurePreservingReplace(NotifyCollectionChangedEventArgs args)
Parameters
HandleStructurePreservingReset(NotifyCollectionChangedEventArgs)
Handles Reset collection changes while preserving existing structure
protected virtual void HandleStructurePreservingReset(NotifyCollectionChangedEventArgs args)
Parameters
Invalidate()
Base calls InvalidateInternal and InvalidateParent
public override void Invalidate()
Invalidate(BindableObject, object, object)
protected static void Invalidate(BindableObject bindable, object oldValue, object newValue)
Parameters
bindableBindableObjectoldValueobjectnewValueobject
InvalidateByChild(SkiaControl)
To be able to fast track dirty children
public override void InvalidateByChild(SkiaControl child)
Parameters
childSkiaControl
InvalidateInternal()
Soft invalidation, without requiring update. So next time we try to draw this one it will recalc everything.
public override void InvalidateInternal()
InvalidateViewsList()
public override void InvalidateViewsList()
IsGestureForChild(SkiaControlWithRect, SKPoint)
public override bool IsGestureForChild(SkiaControlWithRect child, SKPoint point)
Parameters
childSkiaControlWithRectpointSKPoint
Returns
IsViewportAtEndOfMeasuredContent(ScaledRect)
Checks if we allow scroll to load more
protected virtual bool IsViewportAtEndOfMeasuredContent(ScaledRect viewport)
Parameters
viewportScaledRect
Returns
LayoutCell(ScaledSize, ControlInStack, SkiaControl, SKRect, float)
public virtual void LayoutCell(ScaledSize measured, ControlInStack cell, SkiaControl child, SKRect rectForChildrenPixels, float scale)
Parameters
measuredScaledSizecellControlInStackchildSkiaControlrectForChildrenPixelsSKRectscalefloat
MeasureAbsolute(SKRect, float)
Measure children inside absolute layout
public override ScaledSize MeasureAbsolute(SKRect rectForChildrenPixels, float scale)
Parameters
Returns
MeasureAdditionalItems(int, int, float)
public int MeasureAdditionalItems(int batchSize, int aheadCount, float scale)
Parameters
Returns
MeasureAndArrangeCell(SKRect, ControlInStack, SkiaControl, SKRect, float)
protected virtual ScaledSize MeasureAndArrangeCell(SKRect destination, ControlInStack cell, SkiaControl child, SKRect rectForChildrenPixels, float scale)
Parameters
destinationSKRectcellControlInStackchildSkiaControlrectForChildrenPixelsSKRectscalefloat
Returns
MeasureGrid(SKRect, float)
Measures the grid layout and ensures columns fill available width when NeedAutoWidth is false
public virtual ScaledSize MeasureGrid(SKRect rectForChildrenPixels, float scale)
Parameters
Returns
- ScaledSize
Measured size of the grid
MeasureLayout(MeasureRequest, bool)
public virtual ScaledSize MeasureLayout(MeasureRequest request, bool force)
Parameters
requestMeasureRequestforcebool
Returns
MeasureList(SKRect, float)
Enhanced MeasureList with background measurement support
public virtual ScaledSize MeasureList(SKRect rectForChildrenPixels, float scale)
Parameters
Returns
MeasureSingleItem(int, SKRect, float, CancellationToken, bool)
Measures a single item in the background and stages it for structure update. For MeasureVisible Only.
public void MeasureSingleItem(int itemIndex, SKRect constraints, float scale, CancellationToken cancellationToken, bool inBackground)
Parameters
itemIndexintconstraintsSKRectscalefloatcancellationTokenCancellationTokeninBackgroundbool
MeasureStack(SKRect, float, LayoutStructure, bool, SkiaControl, SkiaControl[])
Core measurement logic shared between templated and non-templated scenarios
protected virtual ScaledSize MeasureStack(SKRect rectForChildrenPixels, float scale, LayoutStructure layoutStructure, bool isTemplated, SkiaControl template, SkiaControl[] nonTemplated)
Parameters
rectForChildrenPixelsSKRectscalefloatlayoutStructureLayoutStructureisTemplatedbooltemplateSkiaControlnonTemplatedSkiaControl[]
Returns
MeasureStackLegacy(SKRect, float)
Measuring column/row
public virtual ScaledSize MeasureStackLegacy(SKRect rectForChildrenPixels, float scale)
Parameters
Returns
MeasureStackNonTemplated(SKRect, float)
Measuring column/row with 3-pass approach to handle Fill options correctly
public virtual ScaledSize MeasureStackNonTemplated(SKRect rectForChildrenPixels, float scale)
Parameters
Returns
MeasureStackTemplated(SKRect, float)
Measuring column/row for templated for fastest way possible
public virtual ScaledSize MeasureStackTemplated(SKRect rectForChildrenPixels, float scale)
Parameters
Returns
MeasureWrap(SKRect, float)
TODO for templated measure only visible?! and just reserve predicted scroll amount for scrolling
public virtual ScaledSize MeasureWrap(SKRect rectForChildrenPixels, float scale)
Parameters
Returns
OnAfterDrawingVisibleChildren(DrawingContext, LayoutStructure, List<ControlInStack>)
Can be called by some layouts after they draw visible children
protected virtual void OnAfterDrawingVisibleChildren(DrawingContext ctx, LayoutStructure structure, List<ControlInStack> visibleElements)
Parameters
ctxDrawingContextstructureLayoutStructurevisibleElementsList<ControlInStack>
OnAppeared()
This event can sometimes be called without prior OnAppearing
public virtual void OnAppeared()
OnAppearing()
This can sometimes be omitted,
public virtual void OnAppearing()
OnBeforeDrawingVisibleChildren(DrawingContext, LayoutStructure, List<ControlInStack>)
Can be called by some layouts after they calculated the list of visible children to be drawn, but have not drawn them yet
protected virtual void OnBeforeDrawingVisibleChildren(DrawingContext ctx, LayoutStructure structure, List<ControlInStack> visibleElements)
Parameters
ctxDrawingContextstructureLayoutStructurevisibleElementsList<ControlInStack>
OnChildrenChanged()
Happens when child was added or removed, will call Invalidate() in base
public override void OnChildrenChanged()
OnDisappeared()
public virtual void OnDisappeared()
OnDisappearing()
public virtual void OnDisappearing()
OnDisposing()
Base performs some cleanup actions with Superview
public override void OnDisposing()
OnItemSourceChanged()
public virtual void OnItemSourceChanged()
OnItemTemplateChanged()
public override void OnItemTemplateChanged()
OnItemsSourceChangesApplied()
Triggers after a new ItemsSource was set or an observable collection of an existing one was changed
protected virtual void OnItemsSourceChangesApplied()
OnItemsSourceCollectionChanged(object, NotifyCollectionChangedEventArgs)
Enhanced collection change handler with smart handling and fallback
protected virtual void OnItemsSourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
Parameters
senderobjectargsNotifyCollectionChangedEventArgs
OnLayoutChanged()
DrawingRect size changed
protected override void OnLayoutChanged()
OnLayoutReady()
Layout was changed with dimensions above zero. Rather a helper method, can you more generic OnLayoutChanged().
protected override void OnLayoutReady()
OnLoaded()
IInsideViewport interface: loaded is called when the view is created, but not yet visible
public virtual void OnLoaded()
OnMeasured()
protected override void OnMeasured()
OnMeasuring(float, float, float)
If you call this while measurement is in process (IsMeasuring==True) will return last measured value.
public override ScaledSize OnMeasuring(float widthConstraint, float heightConstraint, float scale)
Parameters
Returns
OnPrintDebug()
Enhanced debug printing
public override void OnPrintDebug()
OnTemplatesAvailable()
public virtual void OnTemplatesAvailable()
OnViewportWasChanged(ScaledRect)
Will be called when viewport containing this view has changed
public virtual void OnViewportWasChanged(ScaledRect viewport)
Parameters
viewportScaledRect
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 override void Paint(DrawingContext ctx)
Parameters
ctxDrawingContext
PreArrange(SKRect, float, float, float)
Returns false if should not render
public override bool PreArrange(SKRect destination, float widthRequest, float heightRequest, float scale)
Parameters
Returns
PropagateVisibilityChanged(bool)
protected override void PropagateVisibilityChanged(bool newvalue)
Parameters
newvaluebool
RefreshAllViews()
Force a full refresh of all cached views (useful for debugging)
public void RefreshAllViews()
RemeasureSingleItemInBackground(int)
Remeasures a single item in the background and updates it in the existing structure
public void RemeasureSingleItemInBackground(int itemIndex)
Parameters
itemIndexint
ReportChildVisibilityChanged(int, bool)
Called by templated cells to report visibility changes. This stages the visibility change to be applied during the next rendering cycle.
public virtual void ReportChildVisibilityChanged(int cellIndex, bool isVisible)
Parameters
ReportChildVisibilityChanged(int, int, bool)
Called by templated cells to report visibility changes for multiple cells. This stages the visibility change to be applied during the next rendering cycle.
public virtual void ReportChildVisibilityChanged(int startIndex, int count, bool isVisible)
Parameters
startIndexintThe starting index of cells in the ItemsSource
countintThe number of cells to change
isVisibleboolThe new visibility state
ReportHotreloadChildAdded(SkiaControl)
public override void ReportHotreloadChildAdded(SkiaControl child)
Parameters
childSkiaControl
ReportHotreloadChildRemoved(SkiaControl)
public override void ReportHotreloadChildRemoved(SkiaControl control)
Parameters
controlSkiaControl
ResetScroll()
public virtual void ResetScroll()
SetChildren(IEnumerable<SkiaControl>)
public override void SetChildren(IEnumerable<SkiaControl> views)
Parameters
viewsIEnumerable<SkiaControl>
SetColumn(BindableObject, int)
public void SetColumn(BindableObject bindable, int value)
Parameters
bindableBindableObjectvalueint
SetColumnSpan(BindableObject, int)
public void SetColumnSpan(BindableObject bindable, int value)
Parameters
bindableBindableObjectvalueint
SetMeasured(float, float, bool, bool, float)
Parameters in PIXELS. sets IsLayoutDirty = true;
protected override ScaledSize SetMeasured(float width, float height, bool widthCut, bool heightCut, float scale)
Parameters
Returns
SetRow(BindableObject, int)
public void SetRow(BindableObject bindable, int value)
Parameters
bindableBindableObjectvalueint
SetRowSpan(BindableObject, int)
public void SetRowSpan(BindableObject bindable, int value)
Parameters
bindableBindableObjectvalueint
SetupViews()
protected virtual void SetupViews()
ShouldPreserveStructureOnCollectionChange(NotifyCollectionChangedEventArgs)
Determines if collection changes should preserve existing measurement structure
protected virtual bool ShouldPreserveStructureOnCollectionChange(NotifyCollectionChangedEventArgs args)
Parameters
Returns
ShouldTriggerLoadMore(ScaledRect)
Determines whether LoadMore should be triggered based on viewport position and measurement state. This prevents race conditions by considering background measurement progress.
public virtual bool ShouldTriggerLoadMore(ScaledRect viewport)
Parameters
viewportScaledRect
Returns
StageStructureChange(StructureChange)
Stages a structure change for processing during rendering pipeline
protected virtual void StageStructureChange(SkiaLayout.StructureChange change)
Parameters
changeSkiaLayout.StructureChange
UpdateRowColumnBindingContexts()
protected void UpdateRowColumnBindingContexts()
UpdateSizeChangedHandlers(BindableObject, object, object)
protected static void UpdateSizeChangedHandlers(BindableObject bindable, object oldValue, object newValue)
Parameters
bindableBindableObjectoldValueobjectnewValueobject
Events
IsEmptyChanged
public event EventHandler<bool> IsEmptyChanged
Event Type
ItemsSourceChangesApplied
public event EventHandler ItemsSourceChangesApplied