WPF:ListView控件与图标的看法? [英] WPF: ListView with icons view?

查看:317
本文介绍了WPF:ListView控件与图标的看法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想不通我怎么能实现在WPF ListView的图标视图(类似Windows资源管理器视图)。搜索在谷歌我只找到有关实现GridView控件,但没有关于图标视图的线索信息。我不是在谈论 System.Windows.Form.ListView ,但 System.Windows.Controls.ListView

I can't figure out how I can implement an Icon View in the WPF ListView (a view similar to the Windows Explorer). Searching on google I only found informations about implementing the GridView but no clues about the Icon View. I'm not talking about System.Windows.Form.ListView but System.Windows.Controls.ListView.

也许还有另一个控件来做到这一点?我没有找到这个相关的东西吗?

Perhaps there is another control to do that? I didn't find anything relevant about this?

我只发现了一些人,使用列表框和改变paneltemplate和icontemplate手工打造的图标视图。我不能相信这是做到这一点的唯一方法。

I've only found some people that build the icon view by hand using the listbox and changing the paneltemplate and the icontemplate. I can't believe this is the only way to do it.

任何线索?

在此先感谢

推荐答案

同Tanveer巴达尔的答案,但有一个WrapPanel而不是UniformGrid。在设置列表框中的以下内容:

Same as Tanveer Badar's answer, but with a WrapPanel instead of a UniformGrid. Set the following in your listbox:

ScrollViewer.HorizontalScrollBarVisibility="Disabled" 
ScrollViewer.VerticalScrollBarVisibility="Auto"

要强制WrapPanel包。

to force the WrapPanel to wrap.

这篇关于WPF:ListView控件与图标的看法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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