在 UWP 中更新绑定的 itemsource 后如何更新 GridView? [英] How to update the GridView after binded itemsource is updated in UWP?

查看:14
本文介绍了在 UWP 中更新绑定的 itemsource 后如何更新 GridView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当 List 集合中的值发生更改时,我需要刷新 GridView.实际上,我已将 List 绑定为 GridView 的 itemsource.我更改了列表值但无法在 GridView 中反映的地方.如何在 UWP 中实现这一点?

I need to refresh the GridView when values changed in the List collection. Actually I have bind the List as itemsource for the GridView. Where i have changed the List values but which could not relected in the GridView. How to acheive this in UWP?

推荐答案

use ObserableListCollection

use ObserableListCollection

yourGridviewOrListview1.ItemsSource = null;
yourGridviewOrListview1.ItemsSource = SingletonClass.YourObList;

这篇关于在 UWP 中更新绑定的 itemsource 后如何更新 GridView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆