首页 > 解决方案 > 闪烁 ListView 加载 Xamarin.forms

问题描述

我想知道当列表视图加载它的数据时如何避免闪烁。我从绑定(名称)中获取数据并将它们显示在标签中。任何想法?

标签: xamlxamarin.forms

解决方案


You can use the IsVisible Property.

For example, in your ViewModel, have a boolean, IsBusy.

When you load data from the server, you set the IsBusy = true;

After you load the data, you set the IsBusy = false;

In your Listview:

<ListView  IsVisible={Binding IsBusy}"/>

推荐阅读