This is a migrated thread and some comments may be shown as answers.

ListView Empty Template

1 Answer 211 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Craig Neblett
Top achievements
Rank 1
Craig Neblett asked on 31 May 2017, 05:37 AM
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.

1 Answer, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 31 May 2017, 07:45 PM
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
Tags
ListView
Asked by
Craig Neblett
Top achievements
Rank 1
Answers by
Lance | Manager Technical Support
Telerik team
Share this question
or