[forms-devel] Repeater Control

Toni Petrina tonipetrina at hotmail.com
Thu Jul 7 16:35:13 UTC 2016


Hi guys,

 

There is one way of using the hypothetical RepeaterView control which doesn’t require a backing StackLayout or Grid.

Consider the scenario where you have a StackLayout inside ScrollView already containing several controls and let’s assume that you want to inject a couple of controls somewhere inside. In this case RepeaterView takes its parent as a host container and simply injects elements from its ItemsSource using the specified ItemTemplate at the position where the RepeaterView is located (itself invisible).

 

So we have to differ between simple replacement for a ListView from an injectable repeater.

 

Cheers

Toni Petrina

 

From: <forms-devel-bounces at lists.xamarin.com> on behalf of Adam Pedley <adam.pedley at gmail.com>
Date: Wednesday 6 July 2016 at 04:47
To: Michael Ridland <rid00z at gmail.com>
Cc: Forms devel <forms-devel at lists.xamarin.com>
Subject: Re: [forms-devel] Repeater Control

 

Thanks Michael. I knew there would be similar controls at a native level, I was wondering if there was an XF control in the library that I missed but apparently not.

 

I hadn't tested the Grid approach with large data, I imagine there would be quite a few scenario's I would need to.

 

The RepeaterView control (working draft name) would be not implementing it via the ListView because the reason I steer clear of it is when I want repeating items but no scrolling attached. Hence you could put this control in a ScrollView, unlike the ListView.

 

If the XF team give the go ahead, it would be great to work on this together.

 

 

 

On Wed, Jul 6, 2016 at 12:20 PM, Michael Ridland <rid00z at gmail.com> wrote:

 

FYI, doing that type of implementation inside a grid is going to be slow. You better off using a listview and spliting multiple controls across a single cell, will be much faster if you do it correctly. Can also look Daniel's flowlistview, but it's fairly easy to roll your own. See attached, this would die if you used a grid. 

 

Thanks


Michael Ridland | Technical Director | Xamarin MVP

XAM Consulting - Mobile Technology Specialists

www.xam-consulting.com

Blog: www.michaelridland.com

 

 

On Wed, Jul 6, 2016 at 12:05 PM, Michael Ridland <rid00z at gmail.com> wrote:

 

You're talking about a control similar to a UICollectionView on iOS? 

 

If so, this is a hard task to do nicely, as you'll need to leverage the correct controls on the underlying native platforms controls like UICollectionView and it's also a must have that you use cell recycling. It's most definately a control that should be part of the Xamarin.Forms Platform, I'd hope that it would be scheduled for development already if not already started. 

 

If the XF team give the go ahead for you to work on it, I would happily help with the implementation. 

 

Actually, would it even be an idea to have this control as a separate nuget like the CarouselView? 

 

Thanks


Michael Ridland | Technical Director | Xamarin MVP

XAM Consulting - Mobile Technology Specialists

www.xam-consulting.com

Blog: www.michaelridland.com

 

 

On Wed, Jul 6, 2016 at 11:52 AM, Adam Pedley <adam.pedley at gmail.com> wrote:

Hi

 

Please let me know if I missed something but a control I keep creating for each project is a repeater control and plenty of people in the community keep asking for it. It seems like a gap in controls in Xamarin Forms.

 

I normally base this off a Grid, add an ItemsSource, DataTemplate, Rows and Columns, then it creates the grid and adds the items as necessary to the format of the DataTemplate.

 

Is this something that Xamarin would look at accepting if I created this control for a PR. I assume this one might go through evo.

 

Or is there a standard where all XF controls need a native counterpart?

 

Thanks

Adam

 

_______________________________________________
forms-devel mailing list
forms-devel at lists.xamarin.com
http://lists.ximian.com/mailman/listinfo/forms-devel

 

 

 

_______________________________________________ forms-devel mailing list forms-devel at lists.xamarin.com http://lists.ximian.com/mailman/listinfo/forms-devel 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/forms-devel/attachments/20160707/9f47cf15/attachment.html>


More information about the forms-devel mailing list