重新加载列表框内容 [英] Reloading Listbox content

查看:92
本文介绍了重新加载列表框内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我看到此帖子时此处.

但是在我的代码中我看不到任何DataBind()方法.

However in my code i don't see any DataBind() Method.

lstBox.DataBind();

如何在C#.Net中重新加载listbox?

How to reload listbox in C#.Net?

Refresh()方法也不起作用.

推荐答案

您可以尝试使用

You might try use ObservableCollection as the ItemSource, and all is done automatically. Your task is then to populate items into the ObservableCollection, there is no need to manually update.

这篇关于重新加载列表框内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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