ListView Empty Template

2 posts, 0 answers
  1. Craig Neblett
    Craig Neblett avatar
    6 posts
    Member since:
    Nov 2005

    Posted 31 May Link to this post

    It would be great to have an empty template for the ListView. I know I can use another element and turn visible on and off, but a template would be much cleaner.
  2. Lance | Tech Support Engineer, Sr.
    Admin
    Lance | Tech Support Engineer, Sr. avatar
    457 posts

    Posted 31 May Link to this post

    Hi Craig,

    The reason it's not available for Xamarin.Forms is because not all the individual native control have support for it yet.  However, you can implement it for some by using a custom renderer and using the native control's empty content properties.

    For example,

    - For UWP:  The UWP ListView EmptyContent property does exactly what you're looking for.

    For Android: There is support for EmptyContent, see here.

    - For iOS: There is no current support for EmptyContent. In your custom renderer, you could have your own UIView for the TKListView.BackgroundView property, then when the Items count is more than one you can clear it.


    If you're not sure how to create a custom renderer, you can read up on it here.

    Regards,
    Lance | Tech Support Engineer, Sr.
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top