有什么类似于Android RecyclerView for C#Winforms的东西吗 [英] Is there anything similar to Android RecyclerView for C# Winforms

查看:86
本文介绍了有什么类似于Android RecyclerView for C#Winforms的东西吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前正在使用显示联系人的winforms应用程序,但是我的内存有问题.

对于每个联系人,我构建一个带有标签的面板,其中的名称用于内部名称和数字,然后将其添加到主面板中.假设我有1000个联系人;我最终将创建1000个面板以及一个主面板.

我的问题是,即使一次只能在主面板中看到10个左右的面板(联系人),我仍然会构建所有1000个面板,这会占用大量内存.

我想要一种仅构建在主面板中可见的面板的方法.理想情况下,我想要类似于 Android中的RecyclerView .在C#或Winforms中是否有与此功能相似的库?

解决方案

Winforms当前不支持回收视图类型的列表视图.为此,第三方供应商提供了带有控件的相关解决方案. 尝试使用开放源代码的ObjectListView. 的

Currently am working on an winforms application which shows contacts, but I have a problem with memory.

For each contact I build a panel with labels inside for name inside for name and number, and I will add this to my main Panel. Assume I have 1000 contacts; I would end up creating 1000 Panels along with one main panel.

My problem is, even though only 10 or so Panels (contacts) are visible in main Panel at any one time, I would still build all 1000 Panels, which is consuming a lot of memory.

I want a way to only build the Panel which are visible in main Panel. Ideally I want something similar to the RecyclerView in android. Is there any library which does similar to this in C# or Winforms?

解决方案

Winforms does not currently support recycle-view kind of list views. For this sme third-party vendors are offering related solutions with there controls. Try ObjectListView which is open-source. Its sourced at code-project

这篇关于有什么类似于Android RecyclerView for C#Winforms的东西吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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