显示搜索数据的最佳方式是什么? [英] What is the best way to display search data?

查看:70
本文介绍了显示搜索数据的最佳方式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用程序,用户可以根据文件系统中的名称搜索文件。由于我必须搜索大量文件夹,因此我想在每个文件夹中找到它们时显示搜索结果。基本上我想通过文件系统树导航
并搜索每个文件夹。如果我找到与搜索到的名称匹配的文件,我想立即显示它。我可能会在子文件夹下找到更多文件,并在匹配时显示它们。我正在考虑使用回调和
每次找到匹配时都会在回调中发送结果。有没有更好的方法呢?

解决方案


欢迎
到开发通用Windows应用论坛!
 请使用   标记  当
发布到此论坛时,谢谢!


我认为您可以使用
ListView
 其项目还可以显示您想要的文件信息。虽然您可以绑定
ObservableCollection< T> class object witch表示动态数据集合,在添加,删除项目或刷新整个列表时提供通知。
因此,当结果发生变化时,它会自动在屏幕上显示更新文件。


祝你好运,


Breeze


Hi, i am working on an app with which the user can search for files based on their name in the file system. Since i have to search through a lot of folders, i want to display the search results as I find them in each folder. Basically I want to navigate through the file system tree and search each folder. If i find files matching the name searched for, I want to display it immediately. I might find more files under the subfolders and they'll be displayed when matched. I was thinking of using a callback and sending the result in the callback whenever i find a match. Is there a better way to do this?

解决方案

Hi,

Welcome to the Developing Universal Windows apps forum! Please utilize tagging when posting to this forum, thanks!

I think you can show the files using the ListView whose items can also show the file information you want. While you can bind the ObservableCollection<T> class object witch represents a dynamic data collection that provides notifications when items get added, removed, or when the whole list is refreshed. So it will show the update the files automatically on the screen when the result is changed.

Best regards,

Breeze


这篇关于显示搜索数据的最佳方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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