Async Ready ListView

The Picker and ListView controls in XF are painful because they are not Async ready out of the box. The Picker control literally destroys your model by blanking out the property bound to SelectedItem if the ItemsSource is set before the SelectedItem, and the ListView control won't highlight the selected row if the SelectedItem is set before the ItemsSource. We tried the SyncFusion SfListView which can be coerced in to being async ready, but comes with its own set of problems.

@AceCoderLaura, created this control:
https://github.com/MelbourneDeveloper/Adapt.Presentation/blob/master/Adapt.Presentation.Standard/Adapt/Presentation/Controls/AdaptListView.cs

It's tight! Async ready, uses no custom renderers, works on all platforms, and is just 117 lines of code.

Clone repo here:
https://github.com/MelbourneDeveloper/Adapt.Presentation.git

A sample for this will be added to the repo soon, and the control will be available in the Adapt.Presentation NuGet package soon.

Posts

  • XAML_GUYXAML_GUY USMember ✭✭

    Hi Christian,

    It’s great to hear SfListView meets your async requirements and we regret that you have faced some other problems while using it. Please let us know the problem or the requirement details which you could not achieve using SfListView. Our team will do the needful to provide solution for your needs. You can also post query in our forums.
    https://www.syncfusion.com/forums/xamarin.forms

    Knowledge base articles
    https://www.syncfusion.com/kb/xamarin.forms/sflistview

    Documentation
    https://help.syncfusion.com/xamarin/sflistview/getting-started

    Thanks,
    Sivakumar
    Note: I work for Syncfusion.

  • MelbourneDeveloperMelbourneDeveloper AUMember ✭✭✭
    edited September 2017

    Hi,

    Sorry, but it doesn't meet our async requirements. I had to write heaps of code to coerce it to meet our async requirements. The biggest problem is that if you set the SelectedItem before the ItemsSource, you get an error saying that the SelectedItem doesn't exist in the ItemsSource. This means that the control is not async ready because we don't know which will come first: the SelectedItem, or the ItemsSource. Even when I finally got it working with async, it didn't work on all platforms.

    Anyway, the control above works well so we'll be running with that until we need extra functionality.

  • NMackayNMackay GBInsider, University mod

    @MelbourneDeveloper

    The Telerik list had a similar issue that only because apparent in our Prism app which is all async. They have since resolved the bug.

  • MelbourneDeveloperMelbourneDeveloper AUMember ✭✭✭

    Yep. I'm trying to reduce our reliance on 3rd party controls. SyncFusion stands out as a company that aims towards making quality controls that follow Microsoft coding standards more than other 3rd parties. But still, the code is not open source, and in this case, the AdaptListView posted above is just perfect for our needs.

Sign In or Register to comment.