如何更改ListView的主题? [英] How to change ListView's theme?

查看:86
本文介绍了如何更改ListView的主题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Basic.NET(Framework 4.0)在Windows 7中构建一个简单的应用程序

并使用ListView显示数据。

但是,我不知道喜欢当前的ListView主题...(只有项目是XP主题:()

请看下面的图片





我的应用程序的ListView主题:

图片1



其他应用程序的ListView主题:(任务管理器)

图片2



如何更改ListView的主题?

我需要你的帮助T ^ T

I'm building a simple application in Windows 7 With Visual Basic.NET (Framework 4.0)
And using ListView to display data.
But, I don't like current ListView theme... ( Only Items are XP Theme :( )
Please see the pictures below


My Application's ListView Theme:
Image 1

Other Application's ListView Theme: (Task Manager)
Image 2

How can I change the theme of ListView?
I need your help T^T

推荐答案

<DllImport("uxtheme", CharSet:=CharSet.Unicode)>
Public Shared Function SetWindowTheme(hWnd As IntPtr, SubAppName As String, SubId As String) As Int32
End Function





用法:



Usage:

Call SetWindowTheme(ListView.Handle, "explorer", vbNullString)


hi SlaneR,

我们在listview属性中找不到任何样式属性你应该创建css文件并为所有控件应用css类。



参考此链接:



http://asp-net-example.blogspot.in/2009/12/listview-control-how-to-use-listview.html [ ^ ]


hi SlaneR,
we will not find any style properties in listview properties .You should create css files and apply css classes for the all controls.

Refer this link:

http://asp-net-example.blogspot.in/2009/12/listview-control-how-to-use-listview.html[^]


这篇关于如何更改ListView的主题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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