Class RadCollectionView
Represents the ultimate data visualization control for .NET MAUI applications, providing enterprise-grade performance and functionality for displaying and interacting with collections of data.
Inherited Members
Namespace: Telerik.Maui.Controls
Assembly: Telerik.Maui.Controls.dll
Syntax
public class RadCollectionView : RadLayout, ICollectionView, ISelector
Remarks
The RadCollectionView is engineered for performance and flexibility, featuring UI virtualization that enables smooth scrolling through thousands of items while maintaining optimal memory usage. Whether you're building consumer apps or enterprise solutions, this control adapts to your needs with extensive customization options.
Core Performance Features:
- UI Virtualization: Renders only visible items for optimal performance with large datasets
- Incremental Loading: Load-on-demand support for seamless data pagination
- Smooth Scrolling: Hardware-accelerated scrolling with momentum and bounce effects
- Memory Efficiency: Intelligent item recycling minimizes memory footprint
Data Management Excellence:
- Advanced Grouping: Multi-level hierarchical grouping with customizable group headers and footers
- Dynamic Filtering: Real-time data filtering with complex filter expressions
- Multi-Column Sorting: Sort by multiple criteria with ascending/descending options
- Live Data Updates: Automatic UI updates when bound collections change
Layout Flexibility:
- Linear Layouts: Vertical and horizontal list arrangements with customizable spacing
- Grid Layouts: Multi-column grids with automatic sizing and span support
User Interaction Features:
- Flexible Selection: Single, multiple, or no selection with visual feedback
- Drag and Drop: Intuitive item reordering and cross-collection transfers
- Swipe Gestures: Swipe-to-action with customizable swipe content
- Pull-to-Refresh: Native refresh gestures for data reloading
- Touch and Keyboard Navigation: Accessibility with keyboard shortcuts and screen reader support
Visual Customization:
- Rich Templating: Fully customizable item, header, footer, and empty state templates
- Conditional Styling: Apply different styles based on data values or item states
- Theme Integration: Seamless integration with application themes and design systems
Perfect for a wide range of scenarios including product catalogs, contact lists, image galleries, news feeds, file explorers, and any application requiring efficient display and manipulation of data collections. The control automatically adapts to different screen sizes and orientations, ensuring a consistent experience across phones, tablets, and desktop applications.
Examples
Simple data binding with custom item template:
<telerik:RadCollectionView ItemsSource="{Binding Products}">
<telerik:RadCollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="10">
<Label Text="{Binding Name}" FontSize="16" FontAttributes="Bold"/>
<Label Text="{Binding Price, StringFormat='${0:F2}'}" Grid.Row="1"/>
</Grid>
</DataTemplate>
</telerik:RadCollectionView.ItemTemplate>
</telerik:RadCollectionView>
Advanced grid layout with grouping and selection:
<telerik:RadCollectionView ItemsSource="{Binding PhotoCollection}"
SelectionMode="Multiple"
GroupDescriptors="{Binding GroupingDescriptors}">
<telerik:RadCollectionView.LayoutDefinition>
<telerik:CollectionViewGridLayout SpanCount="3" />
</telerik:RadCollectionView.LayoutDefinition>
</telerik:RadCollectionView>
Load-on-demand with infinite scrolling:
<telerik:RadCollectionView ItemsSource="{Binding Items}"
IsLoadOnDemandEnabled="True"
LoadOnDemandCommand="{Binding LoadMoreCommand}">
<telerik:RadCollectionView.LoadOnDemandTemplate>
<DataTemplate>
<ActivityIndicator IsRunning="True" />
</DataTemplate>
</telerik:RadCollectionView.LoadOnDemandTemplate>
</telerik:RadCollectionView>
Constructors
RadCollectionView()
Initializes a new instance of the RadCollectionView class with default settings. Creates an empty collection view ready to be configured with data source, layout, and templates.
Declaration
public RadCollectionView()
Fields
AutoExpandGroupsProperty
Identifies the AutoExpandGroups bindable property.
Declaration
public static readonly BindableProperty AutoExpandGroupsProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
AutomaticLoadOnDemandTemplateProperty
Identifies the AutomaticLoadOnDemandTemplate bindable property.
Declaration
public static readonly BindableProperty AutomaticLoadOnDemandTemplateProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
CurrentItemProperty
Identifies the CurrentItem bindable property.
Declaration
public static readonly BindableProperty CurrentItemProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
DisplayMemberPathProperty
Identifies the DisplayMemberPath bindable property.
Declaration
public static readonly BindableProperty DisplayMemberPathProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
DragDropBehaviorProperty
Identifies the DragDropBehavior dependency property.
Declaration
public static readonly BindableProperty DragDropBehaviorProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
DragVisualTemplateProperty
Identifies the DragVisualTemplate dependency property.
Declaration
public static readonly BindableProperty DragVisualTemplateProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
DropIndicatorTemplateProperty
Identifies the DropIndicatorTemplate dependency property.
Declaration
public static readonly BindableProperty DropIndicatorTemplateProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
EmptyContentDisplayModeProperty
Identifies the EmptyContentDisplayMode bindable property.
Declaration
public static readonly BindableProperty EmptyContentDisplayModeProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
EmptyContentTemplateProperty
Identifies the EmptyContentTemplate bindable property.
Declaration
public static readonly BindableProperty EmptyContentTemplateProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
EnableStickyGroupHeadersProperty
Identifies the EnableStickyGroupHeaders bindable property.
Declaration
public static readonly BindableProperty EnableStickyGroupHeadersProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
EndItemSwipeCommandProperty
Identifies the EndItemSwipeCommand dependency property.
Declaration
public static readonly BindableProperty EndItemSwipeCommandProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
EndSwipeLengthProperty
Identifies the EndSwipeLength dependency property.
Declaration
public static readonly BindableProperty EndSwipeLengthProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
EndSwipeTemplateProperty
Identifies the EndSwipeTemplate dependency property.
Declaration
public static readonly BindableProperty EndSwipeTemplateProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
FilterDescriptorsProperty
Identifies the FilterDescriptors bindable property.
Declaration
public static readonly BindableProperty FilterDescriptorsProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
FooterTemplateProperty
GroupDescriptorsProperty
Identifies the GroupDescriptors bindable property.
Declaration
public static readonly BindableProperty GroupDescriptorsProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
GroupHeaderTemplateProperty
Identifies the GroupHeaderTemplate bindable property.
Declaration
public static readonly BindableProperty GroupHeaderTemplateProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
GroupTapCommandProperty
Identifies the GroupTapCommand bindable property.
Declaration
public static readonly BindableProperty GroupTapCommandProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
GroupViewStyleProperty
Identifies the GroupViewStyle bindable property.
Declaration
public static readonly BindableProperty GroupViewStyleProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
GroupViewStyleSelectorProperty
Identifies the GroupViewStyleSelector bindable property.
Declaration
public static readonly BindableProperty GroupViewStyleSelectorProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
HeaderTemplateProperty
Identifies the HeaderTemplate bindable property.
Declaration
public static readonly BindableProperty HeaderTemplateProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
HorizontalScrollBarVisibilityProperty
Identifies the HorizontalScrollBarVisibility bindable property.
Declaration
public static readonly BindableProperty HorizontalScrollBarVisibilityProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
IsDragDropEnabledProperty
Identifies the IsDragDropEnabled dependency property.
Declaration
public static readonly BindableProperty IsDragDropEnabledProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
IsItemSwipeEnabledProperty
Identifies the IsItemSwipeEnabled dependency property.
Declaration
public static readonly BindableProperty IsItemSwipeEnabledProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
IsLoadOnDemandActiveProperty
Identifies the IsLoadOnDemandActive bindable property.
Declaration
public static readonly BindableProperty IsLoadOnDemandActiveProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
IsLoadOnDemandEnabledProperty
Identifies the IsLoadOnDemandEnabled bindable property.
Declaration
public static readonly BindableProperty IsLoadOnDemandEnabledProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
ItemsLayoutProperty
Identifies the ItemsLayout bindable property.
Declaration
public static readonly BindableProperty ItemsLayoutProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
ItemsSourceProperty
Identifies the ItemsSource bindable property.
Declaration
public static readonly BindableProperty ItemsSourceProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
ItemTapCommandProperty
Identifies the ItemTapCommand bindable property.
Declaration
public static readonly BindableProperty ItemTapCommandProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
ItemTemplateProperty
Identifies the ItemTemplate bindable property.
Declaration
public static readonly BindableProperty ItemTemplateProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
ItemViewStyleProperty
Identifies the ItemViewStyle bindable property.
Declaration
public static readonly BindableProperty ItemViewStyleProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
ItemViewStyleSelectorProperty
Identifies the ItemViewStyleSelector bindable property.
Declaration
public static readonly BindableProperty ItemViewStyleSelectorProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
LoadOnDemandBufferItemsCountProperty
Identifies the LoadOnDemandBufferItemsCount bindable property.
Declaration
public static readonly BindableProperty LoadOnDemandBufferItemsCountProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
LoadOnDemandCommandProperty
Identifies the LoadOnDemandCommand bindable property.
Declaration
public static readonly BindableProperty LoadOnDemandCommandProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
LoadOnDemandModeProperty
Identifies the LoadOnDemandMode bindable property.
Declaration
public static readonly BindableProperty LoadOnDemandModeProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
ManualLoadOnDemandTemplateProperty
Identifies the ManualLoadOnDemandTemplate bindable property.
Declaration
public static readonly BindableProperty ManualLoadOnDemandTemplateProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
SelectedIndexProperty
Identifies the SelectedIndex bindable property.
Declaration
public static readonly BindableProperty SelectedIndexProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
SelectedItemProperty
Identifies the SelectedItem bindable property.
Declaration
public static readonly BindableProperty SelectedItemProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
SelectedItemsProperty
Identifies the SelectedItems bindable property.
Declaration
public static readonly BindableProperty SelectedItemsProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
SelectionModeProperty
Identifies the SelectionMode bindable property.
Declaration
public static readonly BindableProperty SelectionModeProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
SortDescriptorsProperty
Identifies the SortDescriptors bindable property.
Declaration
public static readonly BindableProperty SortDescriptorsProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
StartSwipeLengthProperty
Identifies the StartSwipeLength dependency property.
Declaration
public static readonly BindableProperty StartSwipeLengthProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
StartSwipeTemplateProperty
Identifies the StartSwipeTemplate dependency property.
Declaration
public static readonly BindableProperty StartSwipeTemplateProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
SwipeCompletedCommandProperty
Identifies the SwipeCompletedCommand dependency property.
Declaration
public static readonly BindableProperty SwipeCompletedCommandProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
SwipeStartingCommandProperty
Identifies the SwipeStartingCommand dependency property.
Declaration
public static readonly BindableProperty SwipeStartingCommandProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
SwipeThresholdProperty
Identifies the SwipeThreshold dependency property.
Declaration
public static readonly BindableProperty SwipeThresholdProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
SwipingCommandProperty
Identifies the SwipingCommand dependency property.
Declaration
public static readonly BindableProperty SwipingCommandProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
VerticalScrollBarVisibilityProperty
Identifies the VerticalScrollBarVisibility bindable property.
Declaration
public static readonly BindableProperty VerticalScrollBarVisibilityProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
Properties
AutoExpandGroups
Gets or sets a value indicating whether groups in the control are automatically expanded.
Declaration
public bool AutoExpandGroups { get; set; }
Property Value
System.Boolean
|
AutomaticLoadOnDemandTemplate
Gets or sets the Microsoft.Maui.Controls.DataTemplate that defines the visual representation of the loading indicator in Automatic mode. This template is used to create the loading indicator shown while data is being loaded automatically.
Declaration
public DataTemplate AutomaticLoadOnDemandTemplate { get; set; }
Property Value
Microsoft.Maui.Controls.DataTemplate
|
CurrentItem
Gets or sets the current item in the collection view for keyboard navigation purposes. This is primarily used on desktop platforms to track which item has keyboard focus. The current item is visually highlighted and can be navigated using arrow keys.
Declaration
public object CurrentItem { get; set; }
Property Value
System.Object
|
DisplayMemberPath
Gets or sets the path to a property on the source object that will be used as the visual representation of the item. When ItemTemplate is not specified, this property path will be used to display text for each item.
Declaration
public string DisplayMemberPath { get; set; }
Property Value
System.String
|
DragDropBehavior
Gets or sets the custom behavior that controls drag and drop operations for collection view items. This behavior allows you to override the default drag and drop logic with custom handling for drag validation, drop positioning, and data manipulation.
Declaration
public CollectionViewDragDropBehavior DragDropBehavior { get; set; }
Property Value
CollectionViewDragDropBehavior
|
DragVisualTemplate
Gets or sets the Microsoft.Maui.Controls.DataTemplate that defines the visual representation of an item while it is being dragged. This template determines how the dragged item appears as it follows the user's finger or cursor during the drag operation.
Declaration
public DataTemplate DragVisualTemplate { get; set; }
Property Value
Microsoft.Maui.Controls.DataTemplate
|
DropIndicatorTemplate
Gets or sets the Microsoft.Maui.Controls.DataTemplate that defines the visual appearance of the drop indicator. The drop indicator is shown between items during drag and drop operations to indicate where the dragged item will be placed.
Declaration
public DataTemplate DropIndicatorTemplate { get; set; }
Property Value
Microsoft.Maui.Controls.DataTemplate
|
EmptyContentDisplayMode
Gets or sets a value that determines when the EmptyContentTemplate will be displayed. Options include showing when ItemsSource is null, or when it's null or empty.
Declaration
public EmptyContentDisplayMode EmptyContentDisplayMode { get; set; }
Property Value
EmptyContentDisplayMode
|
EmptyContentTemplate
Gets or sets the Microsoft.Maui.Controls.DataTemplate that defines the content displayed when the collection view has no items to show. The visibility is controlled by the EmptyContentDisplayMode property.
Declaration
public DataTemplate EmptyContentTemplate { get; set; }
Property Value
Microsoft.Maui.Controls.DataTemplate
|
EnableStickyGroupHeaders
Gets or sets a value indicating whether group headers remain fixed (sticky) at the top of the collection view while scrolling through group content. This feature is supported on iOS and Android platforms only.
Declaration
public bool EnableStickyGroupHeaders { get; set; }
Property Value
System.Boolean
|
EndItemSwipeCommand
Gets the command that can be used to programmatically close any currently swiped item and return it to its normal position. This command is useful for closing swipe views from external code or user interface elements.
Declaration
public ICommand EndItemSwipeCommand { get; }
Property Value
System.Windows.Input.ICommand
|
EndSwipeLength
Gets or sets the width that a swiped item retains when swiped from the end edge (right in LTR, left in RTL). This determines how much of the end swipe template remains visible after the swipe completes.
Declaration
public double EndSwipeLength { get; set; }
Property Value
System.Double
|
EndSwipeTemplate
Gets or sets the Microsoft.Maui.Controls.DataTemplate that defines the visual content displayed when an item is swiped from the end edge. In vertical orientation, this appears when swiping right; in horizontal orientation, when swiping down.
Declaration
public DataTemplate EndSwipeTemplate { get; set; }
Property Value
Microsoft.Maui.Controls.DataTemplate
|
FilterDescriptors
Gets the collection of FilterDescriptorBase objects that define the filtering criteria for the collection view. All filter descriptors are applied simultaneously to determine which items are visible.
Declaration
public FilterDescriptorCollection FilterDescriptors { get; }
Property Value
FilterDescriptorCollection
|
FooterTemplate
GroupDescriptors
Gets the collection of GroupDescriptorBase objects that define the grouping criteria for the collection view. Multiple group descriptors create a hierarchical grouping structure with multiple group levels.
Declaration
public GroupDescriptorCollection GroupDescriptors { get; }
Property Value
GroupDescriptorCollection
|
GroupHeaderTemplate
Gets or sets the Microsoft.Maui.Controls.DataTemplate that defines the visual representation of group headers. Can be a Microsoft.Maui.Controls.DataTemplate or Microsoft.Maui.Controls.DataTemplateSelector for custom template selection logic. Only applicable when grouping is enabled via GroupDescriptors.
Declaration
public DataTemplate GroupHeaderTemplate { get; set; }
Property Value
Microsoft.Maui.Controls.DataTemplate
|
GroupTapCommand
Gets or sets the command that is executed when a group header is tapped. The command parameter is the group context of the tapped group header.
Declaration
public ICommand GroupTapCommand { get; set; }
Property Value
System.Windows.Input.ICommand
|
GroupViewStyle
Gets or sets the Microsoft.Maui.Controls.Style that is applied to the container element generated for each group header. This style is applied to RadCollectionViewGroupView instances.
Declaration
public Style GroupViewStyle { get; set; }
Property Value
Microsoft.Maui.Controls.Style
|
GroupViewStyleSelector
Gets or sets the style selector that provides custom style-selection logic for group header container elements. Allows applying different styles to different group headers based on their group context or other criteria.
Declaration
public IStyleSelector GroupViewStyleSelector { get; set; }
Property Value
IStyleSelector
|
HeaderTemplate
Gets or sets the Microsoft.Maui.Controls.DataTemplate that will be displayed at the beginning of the collection view content. This header appears before all items and groups in the scrollable area.
Declaration
public DataTemplate HeaderTemplate { get; set; }
Property Value
Microsoft.Maui.Controls.DataTemplate
|
HorizontalScrollBarVisibility
Gets or sets the visibility of the horizontal scroll bar. Controls when the horizontal scroll indicator is shown during scrolling.
Declaration
public ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }
Property Value
Microsoft.Maui.ScrollBarVisibility
|
IsDragDropEnabled
Gets or sets a value indicating whether drag and drop functionality is enabled for collection view items. When enabled, users can drag items to reorder them within the collection or move them to other drop targets.
Declaration
public bool IsDragDropEnabled { get; set; }
Property Value
System.Boolean
|
IsItemSwipeEnabled
Gets or sets a value indicating whether items in the collection view can be swiped to reveal additional content or actions. When enabled, users can swipe items left or right to access swipe templates.
Declaration
public bool IsItemSwipeEnabled { get; set; }
Property Value
System.Boolean
|
IsLoadOnDemandActive
Gets or sets a value indicating whether an asynchronous load-on-demand operation is currently in progress. This property is automatically managed when using LoadOnDemandCollection<T>. When handling LoadOnDemand event or LoadOnDemandCommand manually, set this to true before starting async operations and false after completing them to prevent multiple concurrent requests.
Declaration
public bool IsLoadOnDemandActive { get; set; }
Property Value
System.Boolean
|
IsLoadOnDemandEnabled
Gets or sets a value indicating whether the load-on-demand feature is enabled. When enabled, the collection view can automatically or manually trigger loading of additional items as the user scrolls or interacts with the control. Use the LoadOnDemand event or LoadOnDemandCommand to handle loading requests, or use LoadOnDemandCollection<T> as ItemsSource.
Declaration
public bool IsLoadOnDemandEnabled { get; set; }
Property Value
System.Boolean
|
ItemsLayout
Gets or sets the layout strategy that defines how items are arranged and displayed in the collection view. Supports linear layouts (CollectionViewLinearLayout) and grid layouts (CollectionViewGridLayout).
Declaration
public CollectionViewLayoutBase ItemsLayout { get; set; }
Property Value
CollectionViewLayoutBase
|
ItemsSource
Gets or sets the data source used to generate the content of the collection view. This can be any object that implements System.Collections.IEnumerable, such as a list, array, or observable collection.
Declaration
public object ItemsSource { get; set; }
Property Value
System.Object
|
ItemTapCommand
Gets or sets the command that is executed when a collection view item is tapped. The command parameter is the data context of the tapped item.
Declaration
public ICommand ItemTapCommand { get; set; }
Property Value
System.Windows.Input.ICommand
|
ItemTemplate
Gets or sets the Microsoft.Maui.Controls.DataTemplate that defines the visual representation of items in the collection view. Can be a Microsoft.Maui.Controls.DataTemplate or Microsoft.Maui.Controls.DataTemplateSelector for custom template selection logic.
Declaration
public DataTemplate ItemTemplate { get; set; }
Property Value
Microsoft.Maui.Controls.DataTemplate
|
ItemViewStyle
Gets or sets the Microsoft.Maui.Controls.Style that is applied to the container element generated for each item. This style is applied to RadCollectionViewItemView instances.
Declaration
public Style ItemViewStyle { get; set; }
Property Value
Microsoft.Maui.Controls.Style
|
ItemViewStyleSelector
Gets or sets the style selector that provides custom style-selection logic for item container elements. Allows applying different styles to different items based on their data context or other criteria.
Declaration
public IStyleSelector ItemViewStyleSelector { get; set; }
Property Value
IStyleSelector
|
LoadOnDemandBufferItemsCount
Gets or sets the number of items before the end of the current data that will trigger automatic load-on-demand. This property only applies when LoadOnDemandMode is set to Automatic. A larger value will trigger loading earlier as the user scrolls towards the end.
Declaration
public int LoadOnDemandBufferItemsCount { get; set; }
Property Value
System.Int32
|
LoadOnDemandCommand
Gets or sets the command that is executed when a load-on-demand operation is triggered. In Manual mode, this command is executed when the user clicks the load more button. In Automatic mode, this command is executed when the user scrolls near the end of the current items.
Declaration
public ICommand LoadOnDemandCommand { get; set; }
Property Value
System.Windows.Input.ICommand
|
LoadOnDemandMode
Gets or sets the mode that determines how load-on-demand operations are triggered. Manual mode displays a clickable button, while Automatic mode triggers loading based on scroll position.
Declaration
public LoadOnDemandMode LoadOnDemandMode { get; set; }
Property Value
LoadOnDemandMode
|
ManualLoadOnDemandTemplate
Gets or sets the Microsoft.Maui.Controls.DataTemplate that defines the visual representation of the load-on-demand control in Manual mode. This template is used to create the button or control that users click to load more items.
Declaration
public DataTemplate ManualLoadOnDemandTemplate { get; set; }
Property Value
Microsoft.Maui.Controls.DataTemplate
|
SelectedIndex
Gets or sets the zero-based index of the currently selected item. Returns -1 when no item is selected. In multiple selection mode, returns the index of the first item in the SelectedItems collection.
Declaration
public int SelectedIndex { get; set; }
Property Value
System.Int32
|
SelectedItem
Gets or sets the currently selected item from the data source. Returns null when no item is selected. In multiple selection mode, returns the first item in the SelectedItems collection.
Declaration
public object SelectedItem { get; set; }
Property Value
System.Object
|
SelectedItems
Gets the collection of currently selected items from the data source. This collection is automatically updated when the selection changes and supports notifications.
Declaration
public ObservableCollection<object> SelectedItems { get; }
Property Value
System.Collections.ObjectModel.ObservableCollection<System.Object>
|
SelectionMode
Gets or sets the selection mode that determines how items can be selected in the collection view. Options include None (no selection), Single (one item), or Multiple (multiple items).
Declaration
public CollectionViewSelectionMode SelectionMode { get; set; }
Property Value
CollectionViewSelectionMode
|
SortDescriptors
Gets the collection of SortDescriptorBase objects that define the sorting criteria for the collection view. Multiple sort descriptors create a multi-level sorting operation where subsequent descriptors are used as tie-breakers.
Declaration
public SortDescriptorCollection SortDescriptors { get; }
Property Value
SortDescriptorCollection
|
StartSwipeLength
Gets or sets the width that a swiped item retains when swiped from the start edge (left in LTR, right in RTL). This determines how much of the start swipe template remains visible after the swipe completes.
Declaration
public double StartSwipeLength { get; set; }
Property Value
System.Double
|
StartSwipeTemplate
Gets or sets the Microsoft.Maui.Controls.DataTemplate that defines the visual content displayed when an item is swiped from the start edge. In vertical orientation, this appears when swiping left; in horizontal orientation, when swiping up.
Declaration
public DataTemplate StartSwipeTemplate { get; set; }
Property Value
Microsoft.Maui.Controls.DataTemplate
|
SwipeCompletedCommand
Gets or sets the command that is executed when an item swipe gesture has been completed. This is called after the user has finished the swipe gesture and the final state has been determined.
Declaration
public ICommand SwipeCompletedCommand { get; set; }
Property Value
System.Windows.Input.ICommand
|
SwipeStartingCommand
Gets or sets the command that is executed when an item swipe gesture is about to begin. This provides an opportunity to perform custom logic or cancel the swipe operation.
Declaration
public ICommand SwipeStartingCommand { get; set; }
Property Value
System.Windows.Input.ICommand
|
SwipeThreshold
Gets or sets the minimum distance (in pixels) that a user must swipe to trigger the swipe feature. A smaller threshold makes swipes more sensitive, while a larger threshold requires more deliberate gestures.
Declaration
public double SwipeThreshold { get; set; }
Property Value
System.Double
|
SwipingCommand
Gets or sets the command that is executed continuously while an item is being swiped. This provides real-time feedback during the swipe gesture.
Declaration
public ICommand SwipingCommand { get; set; }
Property Value
System.Windows.Input.ICommand
|
VerticalScrollBarVisibility
Gets or sets the visibility of the vertical scroll bar. Controls when the vertical scroll indicator is shown during scrolling.
Declaration
public ScrollBarVisibility VerticalScrollBarVisibility { get; set; }
Property Value
Microsoft.Maui.ScrollBarVisibility
|
Methods
EndItemSwipe(Boolean, Action)
Programmatically closes any currently swiped item and returns it to its normal position. This method provides direct control over the swipe state without requiring user interaction.
Declaration
public void EndItemSwipe(bool animate = true, Action animationFinished = null)
Parameters
System.Boolean
animate
If |
System.Action
animationFinished
An optional callback that is invoked when the closing animation completes. Only applicable when |
GetDataView()
Gets an IDataViewCollection instance that provides access to the processed data after all sorting, grouping, and filtering operations have been applied. This allows you to traverse and manipulate the data as it appears in the collection view.
Declaration
public IDataViewCollection GetDataView()
Returns
IDataViewCollection
An IDataViewCollection representing the current data view state. |
OnBindingContextChanged()
Invoked whenever the binding context of the control changes.
Declaration
protected override void OnBindingContextChanged()
OnHandlerChanged()
Declaration
protected override void OnHandlerChanged()
OnPropertyChanged(String)
Declaration
protected override void OnPropertyChanged(string propertyName = null)
Parameters
System.String
propertyName
|
ScrollItemIntoView(Object, Boolean)
Scrolls the collection view to bring the specified data item into the visible area. If the item is not currently loaded due to data virtualization, this method will attempt to locate and scroll to it.
Declaration
public void ScrollItemIntoView(object item, bool animate = true)
Parameters
System.Object
item
The data item to scroll to. This should be an item from the ItemsSource. |
System.Boolean
animate
If |
Events
GroupTapped
Occurs when a user taps on a group header. The event provides the group context that was tapped.
Declaration
public event EventHandler<RadTappedEventArgs<GroupContext>> GroupTapped
Event Type
System.EventHandler<RadTappedEventArgs<GroupContext>>
|
GroupTapping
Occurs when a user is in the process of tapping on a group header. This event is raised before the GroupTapped event and can be cancelled.
Declaration
public event EventHandler<RadTappingEventArgs<GroupContext>> GroupTapping
Event Type
System.EventHandler<RadTappingEventArgs<GroupContext>>
|
ItemTapped
Occurs when a user taps on a collection view item. The event provides the tapped item's data context.
Declaration
public event EventHandler<RadTappedEventArgs<object>> ItemTapped
Event Type
System.EventHandler<RadTappedEventArgs<System.Object>>
|
LoadOnDemand
Occurs when additional items need to be loaded into the collection view. In Manual mode, this event is raised when the user taps the load more button. In Automatic mode, this event is raised when the user scrolls near the end of the current items. Use LoadOnDemandCollection<T> as ItemsSource for automatic loading indicators, or manually handle this event by setting IsLoadOnDemandActive to true before async operations and false after adding new items to the ItemsSource.
Declaration
public event EventHandler<EventArgs> LoadOnDemand
Event Type
System.EventHandler<System.EventArgs>
|
Scrolled
Occurs when the collection view is scrolled. Provides information about the scroll position and offset.
Declaration
public event EventHandler<ScrolledEventArgs> Scrolled
Event Type
System.EventHandler<Microsoft.Maui.Controls.ScrolledEventArgs>
|
SelectionChanged
Occurs when the selection in the collection view changes. Provides information about added and removed items from the selection.
Declaration
public event EventHandler<RadSelectionChangedEventArgs> SelectionChanged
Event Type
System.EventHandler<RadSelectionChangedEventArgs>
|
SwipeCompleted
Occurs when an item swipe gesture has been completed. This event is raised after the user has finished the swipe gesture and provides the final swipe state.
Declaration
public event EventHandler<CollectionViewSwipeCompletedEventArgs> SwipeCompleted
Event Type
System.EventHandler<CollectionViewSwipeCompletedEventArgs>
|
SwipeStarting
Occurs when an item swipe gesture is about to begin. This event provides an opportunity to cancel the swipe operation before it starts.
Declaration
public event EventHandler<CollectionViewSwipeStartingEventArgs> SwipeStarting
Event Type
System.EventHandler<CollectionViewSwipeStartingEventArgs>
|
Swiping
Occurs while an item is being swiped. This event is raised continuously during the swipe gesture and provides real-time swipe information.
Declaration
public event EventHandler<CollectionViewSwipingEventArgs> Swiping
Event Type
System.EventHandler<CollectionViewSwipingEventArgs>
|