C#Windows7 / Vista风格ListView

当我在VS2008的详细信息视图中创建ListView时,它会创建一个相当古老的列表视图。 它没有任何花哨的hover效果和酷蓝色边框(例如)WinVista和Win7中的文件浏览器。 见图片例如: 替代文字

总结一下,如何才能在C#VS2008中获得一个ListView,如上图所示? (VS2008右侧列表视图进行比较)

谢谢

尝试调用SetWindowTheme

像这样:

[DllImport("uxtheme.dll", ExactSpelling=true, CharSet=CharSet.Unicode)] private static extern int SetWindowTheme(IntPtr hwnd, string pszSubAppName, string pszSubIdList); // The constructor: public MyForm() { SetWindowTheme(this.listView1.Handle, "Explorer", null); } 

您检查过Windows API代码包吗? 它有许多Win7风格的控件。 我认为它有你想要的。