Interface IVirtualScroll
- Namespace
- Nalu
- Assembly
- Nalu.Maui.VirtualScroll.dll
A scrollable view that virtualizes its content.
public interface IVirtualScroll : IView, IElement, ITransform
- Inherited Members
Properties
Adapter
The adapter that provides data to the virtual scroll.
IVirtualScrollAdapter? Adapter { get; set; }
Property Value
FadingEdgeLength
Gets or sets the length of the fading edge effect in device-independent units.
double FadingEdgeLength { get; }
Property Value
Remarks
A value of 0 means no fading edge is applied (default). The orientation of the fading edge is determined by the layout orientation (horizontal or vertical).
FooterTemplate
Gets or sets the template used to display the footer at the bottom of the scroll view.
DataTemplate? FooterTemplate { get; set; }
Property Value
HeaderTemplate
Gets or sets the template used to display the header at the top of the scroll view.
DataTemplate? HeaderTemplate { get; set; }
Property Value
IsRefreshEnabled
Gets or sets a value indicating whether pull-to-refresh is enabled.
bool IsRefreshEnabled { get; set; }
Property Value
IsRefreshing
Gets or sets a value indicating whether the refresh indicator is currently showing. Setting this to true programmatically will trigger the refresh indicator. Setting this to false will stop the refresh indicator.
bool IsRefreshing { get; set; }
Property Value
ItemTemplate
Gets or sets the template used to display each item.
DataTemplate? ItemTemplate { get; set; }
Property Value
ItemsLayout
Gets or sets the layout for the virtual scroll.
IVirtualScrollLayout ItemsLayout { get; set; }
Property Value
RefreshAccentColor
Gets or sets the accent color for the refresh indicator.
Color? RefreshAccentColor { get; set; }
Property Value
RefreshCommand
Gets or sets the command to execute when the user requests a refresh.
ICommand? RefreshCommand { get; set; }
Property Value
SectionFooterTemplate
Gets or sets the template used to display section footers.
DataTemplate? SectionFooterTemplate { get; set; }
Property Value
SectionHeaderTemplate
Gets or sets the template used to display section headers.
DataTemplate? SectionHeaderTemplate { get; set; }
Property Value
Methods
GetGlobalFooterTemplate()
Gets the appropriate global footer template.
DataTemplate? GetGlobalFooterTemplate()
Returns
GetGlobalHeaderTemplate()
Gets the appropriate global header template.
DataTemplate? GetGlobalHeaderTemplate()
Returns
GetItemTemplate(object?)
Gets the appropriate item template for the given item.
DataTemplate? GetItemTemplate(object? item)
Parameters
itemobject
Returns
GetSectionFooterTemplate(object?)
Gets the appropriate section footer template for the given section.
DataTemplate? GetSectionFooterTemplate(object? section)
Parameters
sectionobject
Returns
GetSectionHeaderTemplate(object?)
Gets the appropriate section header template for the given section.
DataTemplate? GetSectionHeaderTemplate(object? section)
Parameters
sectionobject
Returns
ScrollTo(int, int, ScrollToPosition, bool)
Scrolls to the specified item in the virtual scroll.
void ScrollTo(int sectionIndex, int itemIndex, ScrollToPosition position = ScrollToPosition.MakeVisible, bool animated = true)
Parameters
sectionIndexintThe index of the section.
itemIndexintThe index of the item within the section. Use -1 to scroll to the section header.
positionScrollToPositionThe position to scroll to. Defaults to MakeVisible.
animatedboolWhether the scroll should be animated. Defaults to
true.
ScrollTo(object, ScrollToPosition, bool)
Scrolls to the specified item or section in the virtual scroll. This method searches through all sections and items to find the matching object.
void ScrollTo(object itemOrSection, ScrollToPosition position = ScrollToPosition.MakeVisible, bool animated = true)
Parameters
itemOrSectionobjectThe item or section object to scroll to.
positionScrollToPositionThe position to scroll to. Defaults to MakeVisible.
animatedboolWhether the scroll should be animated. Defaults to
true.
Events
OnScrolled
Event raised when the scroll position changes.
event EventHandler<VirtualScrollScrolledEventArgs> OnScrolled