如何更换DevExpress控件皮肤
1个回答
2015-10-13 · 知道合伙人软件行家
关注
展开全部
1. 在项目中添加引用 DevExpress.BonusSkins和 DevExpress.OfficeSkins (这两个引用中有大量的皮肤,默认的只有几个)
2.在启动Form的 Designer文件中添加main函数
?
1
2
3
4
5
6
7
8
Shared Sub main()
'注册皮肤
DevExpress.UserSkins.OfficeSkins.Register()
DevExpress.UserSkins.BonusSkins.Register()
DevExpress.Skins.SkinManager.EnableFormSkins()
Application.Run(New XtraForm1())'启动窗口
End Sub
3.将项目的启动项修改为sub main(), 若无此项,将下面的"启动应用程序框架"的勾去掉
4.在启动窗口添加控件DefaultLookAndFeel,
5.启动时在load事件中 添加
Me.DefaultLookAndFeel1.LookAndFeel.SkinName = "Office 2007 Blue" '皮肤名,可用其他
至此,实现换肤功能. 如果要实现启动后更换皮肤, 可以把所有可用的皮肤名放到ComboBoxEdit1中即可.
附:
默认的皮肤名:Caramel,Money Twins,Lilian,The Asphalt World,iMaginary,Black,Blue
BonusSkins的皮肤名:Coffee,Liquid Sky,London Liquid Sky,Glass Oceans,Stardust,Xmas 2008 Blue,Valentine,McSkin,Summer 2008,Pumpkin,Dark Side,Springtime,Darkroom,Foggy,High Contrast,Seven,Seven Classic,Sharp,Sharp Plus,DevExpress Style
Office的皮肤名:Office 2007 Blue,Office 2007 Black,Office 2007 Silver,Office 2007 Green,Office 2007 Pink,Office 2010 Blue,Office 2010 Black,Office 2010 Silver
得到皮肤名的代码
Dim str As String = ""
For Each skinName As DevExpress.Skins.SkinContainer In DevExpress.Skins.SkinManager.Default.Skins
str = str & skinName.SkinName & ","
Next
2.在启动Form的 Designer文件中添加main函数
?
1
2
3
4
5
6
7
8
Shared Sub main()
'注册皮肤
DevExpress.UserSkins.OfficeSkins.Register()
DevExpress.UserSkins.BonusSkins.Register()
DevExpress.Skins.SkinManager.EnableFormSkins()
Application.Run(New XtraForm1())'启动窗口
End Sub
3.将项目的启动项修改为sub main(), 若无此项,将下面的"启动应用程序框架"的勾去掉
4.在启动窗口添加控件DefaultLookAndFeel,
5.启动时在load事件中 添加
Me.DefaultLookAndFeel1.LookAndFeel.SkinName = "Office 2007 Blue" '皮肤名,可用其他
至此,实现换肤功能. 如果要实现启动后更换皮肤, 可以把所有可用的皮肤名放到ComboBoxEdit1中即可.
附:
默认的皮肤名:Caramel,Money Twins,Lilian,The Asphalt World,iMaginary,Black,Blue
BonusSkins的皮肤名:Coffee,Liquid Sky,London Liquid Sky,Glass Oceans,Stardust,Xmas 2008 Blue,Valentine,McSkin,Summer 2008,Pumpkin,Dark Side,Springtime,Darkroom,Foggy,High Contrast,Seven,Seven Classic,Sharp,Sharp Plus,DevExpress Style
Office的皮肤名:Office 2007 Blue,Office 2007 Black,Office 2007 Silver,Office 2007 Green,Office 2007 Pink,Office 2010 Blue,Office 2010 Black,Office 2010 Silver
得到皮肤名的代码
Dim str As String = ""
For Each skinName As DevExpress.Skins.SkinContainer In DevExpress.Skins.SkinManager.Default.Skins
str = str & skinName.SkinName & ","
Next
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询