来源:https://documentation.devexpress.com/#SkinEditor/CustomDocument2546
1、在VS里,通过Devexpress>Winform Controls v…>Run Skin Editor启动皮肤编辑器
2、新建皮肤项目
3、选择基础皮肤,记住新皮肤名称(skin name)
4、选择要修改的控件,双击黄框部分进行图像编辑。
注:请在Tools>Options…菜单下,指定图像编辑器程序
5、图像编辑完成后,单击【Load Image】等进行图像替换
6、保存工程后,通过菜单File>Create Assembly生成dll。默认在文档\My DXSkins文件夹下
7、随后弹出如下窗口。将这些内容对应地复制到解决方案的 Program.cs/Program.vb 文件的方法里。
8、打开【解决方案资源管理器】,添加引用
注:添加完成后,需要保存解决方案,重启VS。
9、打开【Program.vb】文件,添加如下内容。
注:参考步骤7内容
Imports System Imports System.Configuration Imports System.Windows.Forms Imports DevExpress.Persistent.Base Imports DevExpress.ExpressApp Imports DevExpress.ExpressApp.Security Imports DevExpress.ExpressApp.Win Imports DevExpress.Persistent.BaseImpl Imports 乐智ERP.Win Imports DevExpress.Skins Imports System.ComponentModel Imports DevExpress.LookAndFeel Public Class Program <STAThread()> Public Shared Sub Main(ByVal arguments() As String) '开始 Dim asm As System.Reflection.Assembly = GetType(DevExpress.UserSkins.ilezhiskin).Assembly DevExpress.Skins.SkinManager.Default.RegisterAssembly(asm) SkinManager.EnableFormSkins() '结束 #If EASYTEST Then DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register() #End If Application.EnableVisualStyles() Application.SetCompatibleTextRenderingDefault(False) EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached If Tracing.GetFileLocationFromSettings() = DevExpress.Persistent.Base.FileLocation.CurrentUserApplicationDataFolder Then Tracing.LocalUserAppDataPath = Application.LocalUserAppDataPath End If Tracing.Initialize() Dim _application As 乐智ERPWindowsFormsApplication = New 乐智ERPWindowsFormsApplication() ' Refer to the https://documentation.devexpress.com/eXpressAppFramework/CustomDocument112680.aspx help article for more details on how to provide a custom splash form. '_application.SplashScreen = New DevExpress.ExpressApp.Win.Utils.DXSplashScreen("YourSplashImage.png") SecurityAdapterHelper.Enable() If (Not ConfigurationManager.ConnectionStrings.Item("ConnectionString") Is Nothing) Then _application.ConnectionString = ConfigurationManager.ConnectionStrings.Item("ConnectionString").ConnectionString End If #If EASYTEST Then If (Not ConfigurationManager.ConnectionStrings.Item("EasyTestConnectionString") Is Nothing) Then _application.ConnectionString = ConfigurationManager.ConnectionStrings.Item("EasyTestConnectionString").ConnectionString End If #End If If System.Diagnostics.Debugger.IsAttached Then _application.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways End If Try '开始 UserLookAndFeel.Default.SkinName = "ilezhi" ‘结束 _application.Setup() _application.Start() Catch e As Exception _application.HandleException(e) End Try End Sub End Class ’开始 Public Class SkinRegistration Inherits Component Public Sub New() DevExpress.Skins.SkinManager.Default.RegisterAssembly(GetType(DevExpress.UserSkins.ilezhiskin).Assembly) End Sub End Class ‘结束
======================= 有用的皮肤数据=======================
Common > TextBorder,文本边框