xaml - 闪烁 ListView 加载 Xamarin.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}"/>
推荐阅读
- github - GitHub Action - 从分支 A 推送到分支 B 时触发,但不分支到分支 B
- sql - 根据时间值折叠多行
- c# - 对 C# 中的返回方法和 void 感到困惑
- laravel - 如何为 spatie/laravel-permission 合同/权限制作包装器?
- redux - 在执行第二个 Saga 动作之前执行第一个 Saga 的所有动作
- javascript - 从 setTimeout 调用的函数显示不正确的 React 状态
- python - 从嵌套的 JSON 列表中绘制图表
- javascript - 倒数计时器中的 setInterval 在第一轮后被执行多次
- mongodb - MongoDB 两个 $mulitply 在一个聚合中
- python - 如果在输入中写入内容时单击按钮后显示数据,我该如何解析数据