Add support for sticky group headers (iOS, Android)
This feature is available in the ListView control. E.g. On iOS using the built-in CollectionView it can be added this way:
public class CollectionViewPlatformHandler : CollectionViewHandler { /// <inheritdoc /> protected override ItemsViewLayout SelectLayout() { var layout = base.SelectLayout(); if (ItemsView.IsGrouped && layout is UICollectionViewFlowLayout flowLayout) { // Enable sticky section headers. flowLayout.SectionHeadersPinToVisibleBounds = true; } return layout; } }
Add support for scrollable index titles (iOS).
This feature is available in the ListView control. E.g. On iOS using the built-in CollectionView it can be added this way:
public class CollectionViewPlatformHandler : CollectionViewHandler
{
/// <inheritdoc />
protected override UIView CreatePlatformView()
{
var platformView = base.CreatePlatformView();
if (ItemsView.IsGrouped && ItemsView.ItemsSource is IEnumerable<IGrouping<string, object>> groups && platformView.Subviews[0] is UICollectionView collectionView)
{
// Enable index titles.
collectionView.DataSource = new GroupedCollectionViewDataSource(collectionView.DataSource, groups.Select(q => q.Key));
}
return platformView;
}
private class GroupedCollectionViewDataSource(IUICollectionViewDataSource datasource, IEnumerable<string> sections) : UICollectionViewDataSource
{
public override nint NumberOfSections(UICollectionView collectionView) => datasource.NumberOfSections(collectionView);
public override nint GetItemsCount(UICollectionView collectionView, nint section) => datasource.GetItemsCount(collectionView, section);
public override UICollectionViewCell GetCell(UICollectionView collectionView, NSIndexPath indexPath) => datasource.GetCell(collectionView, indexPath);
public override UICollectionReusableView GetViewForSupplementaryElement(UICollectionView collectionView, NSString elementKind, NSIndexPath indexPath) => datasource.GetViewForSupplementaryElement(collectionView, elementKind, indexPath);
public override string[] GetIndexTitles(UICollectionView collectionView) => sections.ToArray();
}
}
Note: This is available out-of-the-box on iOS 14 and above for a native UICollectionView. See documentation.
In the current CollectionView implementation, the CollectionView will start with all the groups expanded. The only way to have any form of preference is to programmatically interact with the DataView after-the-fact https://docs.telerik.com/devtools/maui/controls/collectionview/grouping/expand-collapse
Requested FeatureThe content inside the swipe template is missing when using MAUI 9.0.40 and Telerik MAUI 10.0.0
Workaround:
Use MAUI 9.0.30 and Telerik MAUI 10.0.0
Add an option to scroll fast to elements inside the CollectionView, something like jump list approach.
This feature is available in the iOS UICollectionView https://developer.apple.com/documentation/uikit/uicollectionviewdatasource/2851455-indextitlesforcollectionview
It could be a great addition to the Telerik MAUI RadCollectionView features set.
Hi Team,
Please consider adding a way to cancel a group's expand/collapse action when the user taps on the group header.
For example, through a GroupTapping event handler that fires just before GroupTapped, and we can execute logic that prevents the operation:
private void RadCollectionView_OnGroupTapping(object sender, RadTappingEventArgs<GroupContext> e)
{
if (e.Data.Key.ToString() == "GroupToStayPermanentlyExpanded")
{
e.Cancel();
}
}
// which uses this imaginary event args with Cancel method
public class RadTappingEventArgs<T>(T data) : RadTappedEventArgs<T>(data)
{
public void Cancel()
{
// prevents GroupTapped event
}
}
Thank you,
Rodrigo
In MAUI CollectionView when scrolling an item into view, the exact position of the item after the scroll has completed can be specified with the position argument of the ScrollTo methods.
Please provide such option for Telerik MAUI CollectionView inside the ScrollItemIntoView method.
1. Bind the CheckedItems collection of the TreeView to the CollectionView ItemsSource.
2. there aren't any items in the TreeView initially. Add items to it
3. Start checking the checkboxes
4. The items are added to the CollectionView, still they are not visible in the control.