Class VirtualScrollChangeFactory
- Namespace
- Nalu
- Assembly
- Nalu.Maui.VirtualScroll.dll
Factory class for creating sectioned virtual scroll changes.
public static class VirtualScrollChangeFactory
- Inheritance
-
VirtualScrollChangeFactory
- Inherited Members
Methods
InsertItem(int, int)
Creates a change for inserting a single item at a given index.
public static VirtualScrollChange InsertItem(int sectionIndex, int itemIndex)
Parameters
sectionIndexintThe section index where the item will be inserted.
itemIndexintThe item index where the item will be inserted.
Returns
- VirtualScrollChange
A new VirtualScrollChange instance.
InsertItemRange(int, int, int)
Creates a change for inserting a contiguous range of items.
public static VirtualScrollChange InsertItemRange(int sectionIndex, int startItemIndex, int endItemIndex)
Parameters
sectionIndexintThe section index where the items will be inserted.
startItemIndexintThe starting item index where the items will be inserted.
endItemIndexintThe ending item index where the items will be inserted (inclusive).
Returns
- VirtualScrollChange
A new VirtualScrollChange instance.
InsertSection(int)
Creates a change for inserting a section (header + items).
public static VirtualScrollChange InsertSection(int sectionIndex)
Parameters
sectionIndexintThe section index where the section will be inserted.
Returns
- VirtualScrollChange
A new VirtualScrollChange instance.
InsertSectionRange(int, int)
Creates a change for inserting multiple contiguous sections.
public static VirtualScrollChange InsertSectionRange(int startSectionIndex, int endSectionIndex)
Parameters
startSectionIndexintThe starting section index where the sections will be inserted.
endSectionIndexintThe ending section index where the sections will be inserted (inclusive).
Returns
- VirtualScrollChange
A new VirtualScrollChange instance.
MoveItem(int, int, int)
Creates a change for moving a single item from one index to another.
public static VirtualScrollChange MoveItem(int sectionIndex, int fromItemIndex, int toItemIndex)
Parameters
sectionIndexintThe section index where the item is located.
fromItemIndexintThe source item index.
toItemIndexintThe destination item index.
Returns
- VirtualScrollChange
A new VirtualScrollChange instance.
MoveSection(int, int)
Creates a change for moving a section from one index to another.
public static VirtualScrollChange MoveSection(int fromSectionIndex, int toSectionIndex)
Parameters
Returns
- VirtualScrollChange
A new VirtualScrollChange instance.
RefreshItem(int, int)
Creates a change for refreshing the item without changing identity or position.
public static VirtualScrollChange RefreshItem(int sectionIndex, int itemIndex)
Parameters
sectionIndexintThe section index where the item is located.
itemIndexintThe item index to refresh.
Returns
- VirtualScrollChange
A new VirtualScrollChange instance.
RefreshSection(int)
Creates a change for refreshing a section without changing its structure.
public static VirtualScrollChange RefreshSection(int sectionIndex)
Parameters
sectionIndexintThe section index to refresh.
Returns
- VirtualScrollChange
A new VirtualScrollChange instance.
RemoveItem(int, int)
Creates a change for removing a single item at a given index.
public static VirtualScrollChange RemoveItem(int sectionIndex, int itemIndex)
Parameters
sectionIndexintThe section index where the item will be removed.
itemIndexintThe item index where the item will be removed.
Returns
- VirtualScrollChange
A new VirtualScrollChange instance.
RemoveItemRange(int, int, int)
Creates a change for removing a contiguous range of items.
public static VirtualScrollChange RemoveItemRange(int sectionIndex, int startItemIndex, int endItemIndex)
Parameters
sectionIndexintThe section index where the items will be removed.
startItemIndexintThe starting item index where the items will be removed.
endItemIndexintThe ending item index where the items will be removed (inclusive).
Returns
- VirtualScrollChange
A new VirtualScrollChange instance.
RemoveSection(int)
Creates a change for removing a section (header + items).
public static VirtualScrollChange RemoveSection(int sectionIndex)
Parameters
sectionIndexintThe section index where the section will be removed.
Returns
- VirtualScrollChange
A new VirtualScrollChange instance.
RemoveSectionRange(int, int)
Creates a change for removing multiple contiguous sections.
public static VirtualScrollChange RemoveSectionRange(int startSectionIndex, int endSectionIndex)
Parameters
startSectionIndexintThe starting section index where the sections will be removed.
endSectionIndexintThe ending section index where the sections will be removed (inclusive).
Returns
- VirtualScrollChange
A new VirtualScrollChange instance.
ReplaceItem(int, int)
Creates a change for replacing the item at a given index. Identity is preserved.
public static VirtualScrollChange ReplaceItem(int sectionIndex, int itemIndex)
Parameters
sectionIndexintThe section index where the item will be replaced.
itemIndexintThe item index where the item will be replaced.
Returns
- VirtualScrollChange
A new VirtualScrollChange instance.
ReplaceItemRange(int, int, int)
Creates a change for replacing a contiguous range of items.
public static VirtualScrollChange ReplaceItemRange(int sectionIndex, int startItemIndex, int endItemIndex)
Parameters
sectionIndexintThe section index where the items will be replaced.
startItemIndexintThe starting item index where the items will be replaced.
endItemIndexintThe ending item index where the items will be replaced (inclusive).
Returns
- VirtualScrollChange
A new VirtualScrollChange instance.
ReplaceSection(int)
Creates a change for replacing all items in a section. Section identity is preserved.
public static VirtualScrollChange ReplaceSection(int sectionIndex)
Parameters
sectionIndexintThe section index where the section will be replaced.
Returns
- VirtualScrollChange
A new VirtualScrollChange instance.
ReplaceSectionRange(int, int)
Creates a change for replacing multiple contiguous sections.
public static VirtualScrollChange ReplaceSectionRange(int startSectionIndex, int endSectionIndex)
Parameters
startSectionIndexintThe starting section index where the sections will be replaced.
endSectionIndexintThe ending section index where the sections will be replaced (inclusive).
Returns
- VirtualScrollChange
A new VirtualScrollChange instance.
Reset()
Creates a change for a full data set reset. Avoid unless absolutely necessary.
public static VirtualScrollChange Reset()
Returns
- VirtualScrollChange
A cached VirtualScrollChange instance.