WPF ListView 的资源管理器主题?
如何在 WPF ListView 中获取资源管理器主题?
我知道答案之一是 GridView,但这就像 Windows 资源管理器中的详细信息视图。
我需要像资源管理器这样的列表、图块和图标视图主题。
我怎样才能得到它?
How do I get the explorer theme in a WPF ListView?
I know that one answer is the GridView, but that is like the Details view in Windows Explorer.
I need the List, Tiles and Icons view themed like the Explorer.
How do I get that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Windows API 代码包 有一个 Explorer 浏览器控件,其外观与 Windows 资源管理器完全相同(当然,我假设您想要显示文件,而不是其他东西......)
无论如何,如果您想自己做,除了 GridView 之外,您还可以创建几个自定义视图。这样,您只需更改
ListView
的View
属性即可在列表、图块、图标和详细信息之间切换。有关如何创建自定义视图的详细信息,请参阅这篇 MSDN 文章。The Windows API Code Pack has an Explorer browser control, which has exactly the same appearance as the Windows Explorer (of course I'm assuming you want to display files, not something else...)
Anyway, if you want to do it yourself, you could create several custom views in addition to the
GridView
. This way you could just change theView
property of theListView
to switch between list, tiles, icons and details. See this MSDN article for details on how to create a custom view.