Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/syncfusionexamples/xamarin-forms-listview-loading-indicator
Sample showcases how to show loading or busy indicator in xamarin forms listview
https://github.com/syncfusionexamples/xamarin-forms-listview-loading-indicator
busy indicator isbusy listview sflistview xamarin xamarin-android xamarin-forms xamarin-ios xamarin-listview xamarin-uwp
Last synced: 26 days ago
JSON representation
Sample showcases how to show loading or busy indicator in xamarin forms listview
- Host: GitHub
- URL: https://github.com/syncfusionexamples/xamarin-forms-listview-loading-indicator
- Owner: SyncfusionExamples
- Created: 2019-08-02T05:53:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-15T13:42:46.000Z (11 months ago)
- Last Synced: 2024-04-14T12:07:22.431Z (9 months ago)
- Topics: busy, indicator, isbusy, listview, sflistview, xamarin, xamarin-android, xamarin-forms, xamarin-ios, xamarin-listview, xamarin-uwp
- Language: C#
- Homepage:
- Size: 505 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Show busy indicator on loading Xamarin.Forms ListView
The SfListView allows displaying the [SfBusyIndicator](https://help.syncfusion.com/cr/cref_files/xamarin/Syncfusion.SfBusyIndicator.XForms~Syncfusion.SfBusyIndicator.XForms.SfBusyIndicator.html) when loading the bounded items. The busy indicator can be enabled and disabled by using [IsBusy](https://help.syncfusion.com/cr/cref_files/xamarin/Syncfusion.SfBusyIndicator.XForms~Syncfusion.SfBusyIndicator.XForms.SfBusyIndicator~IsBusy.html) property.
Create a IsLoading boolean property in view model and bind it to the IsBusy property. By setting the value to IsLoading property, the busy indicator will be enabled and disabled into the view till the items loaded in the SfListView.
```
```
When both SfBusyIndicator and ListView loaded with same row and column, you need to set InputTransparent as True to SfBusyindicator in order to pass touch interaction to listview in iOS platform.```
public class ViewModel : INotifyPropertyChanged
{
private bool isLoading = false;public bool IsLoading
{
get { return isLoading; }
set
{
this.isLoading = value;
OnPropertyChanged("IsLoading");
}
}private async void GenerateItems()
{
IsLoading = true;
await Task.Delay(5000);
for (int i = 0; i < 30; i++)
{
var contact = new Model(CustomerNames[i], ContactNumber[i]);
ContactInfo.Add(contact);
}
IsLoading = false;
}
}
```
To know more about showing busy indocator on loading listview, please refer our documentation [here](https://help.syncfusion.com/xamarin/sflistview/viewappearance?cs-save-lang=1&cs-lang=csharp#show-busy-indicator-on-list-view).