当前位置:网站首页>界面控件DevExpress WinForms皮肤编辑器的这个补丁,你了解了吗?
界面控件DevExpress WinForms皮肤编辑器的这个补丁,你了解了吗?
2022-07-06 17:16:00 【界面开发小八哥】
老用户可能知道,在几年前官方技术团队彻底检查了WinForms 皮肤编辑器——这个新工具现在被称之为“Skin Editor v2”,在所有可能的方面都优于它的前身。Skin Editor v2包括更容易发现的皮肤元素层次结构、可自定义的标签、一系列非常有用的功能(例如,您可以 Ctrl+ 单击“预览”面板中的任何元素来获得负责给定元素外观的皮肤部件列表),支持矢量皮肤和调色板等。
获取DevExpress WinForms v22.1正式版下载
更新后的皮肤编辑器中引入的增强功能有一个缺点……如果您的目标是对标准DevExpress皮肤进行轻微修改,则不得不创建一个重复的皮肤,这意味着您必须导入和注册自定义皮肤。此外,此过程将在皮肤选择器中生成几乎相同的皮肤 - 原始皮肤和您的自定义皮肤。要消除重复项,您还必须修改这些选择器(例如,隐藏标准的“Bezier”皮肤并将其替换为在皮肤编辑器中创建的“My Bezier”)。
为了消除这些问题,WinForm皮肤编辑器 (v21.1)附带了皮肤补丁支持,这个皮肤补丁是直接应用于标准 DevExpress 皮肤的视觉更改列表,皮肤补丁消除了为您的项目生成/导入自定义皮肤的需要。
这个怎么运作?
这是皮肤补丁用例的一个很好的示例:在矢量Office 2019皮肤中停靠面板标题。

如果您发现面板标题字体太大,您可以添加 BarAndDockingController 并在"Docking" 部分手动设置字体。但这样做意味着无论激活皮肤如何,您的硬编码面板字体都将处于激活状态。
您现在可以修补皮肤,替代硬编码或创建新皮肤,启动皮肤编辑器并选择"New Skin Patch"选项卡。 输入补丁名称、保存输出的本地存储文件夹和目标DevExpress皮肤。

找到您要修改的元素,单击"Activate" 并编辑所需/适当的设置。在此示例中,我们需要减少"Docking" 类别下的一些元素的文本大小增量。

补丁保存为单个 .skinpatch 文件,保存后通过SkinManager.Default.RegisterSkinPatch 方法将其从本地存储、流或程序集导入到 Visual Studio 项目中。
namespace MyApp{
static class Program {
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main() {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
SkinManager.Default.RegisterSkinPatch(Application.StartupPath +
"\\patches\\O2019C-Fonts.skinpatch");
//uncomment the following line to undo the skin patch
//SkinManager.Default.ResetSkin(SkinStyle.Office2019Colorful);
Application.Run(new MainForm());
}
}
}下图展示了标准的 "Office 2019 Colorful" 皮肤,其中包含一个补丁,可将文本大小增量从 6 减小到 2。

您可以更进一步并更改补丁中的更多元素,例如修改"Docking > Dock Panels > Caption Buttons"元素来减少按钮填充和大小,这将缩小面板标题来更好地适应您的新标题字体。
DevExpress WinForm拥有180+组件和UI库,能为Windows Forms平台创建具有影响力的业务解决方案。DevExpress WinForms能完美构建流畅、美观且易于使用的应用程序,无论是Office风格的界面,还是分析处理大批量的业务数据,它都能轻松胜任!
DevExpress技术交流群6:600715373 欢迎一起进群讨论
边栏推荐
- Learn self 3D representation like ray tracing ego3rt
- 一行代码实现地址信息解析
- [software reverse automation] complete collection of reverse tools
- Make a simple graphical interface with Tkinter
- Alexnet experiment encounters: loss Nan, train ACC 0.100, test ACC 0.100
- Mujoco Jacobi - inverse motion - sensor
- Leetcode(547)——省份数量
- [software reverse - solve flag] memory acquisition, inverse transformation operation, linear transformation, constraint solving
- Five different code similarity detection and the development trend of code similarity detection
- Zynq transplant ucosiii
猜你喜欢

Part IV: STM32 interrupt control programming

.class文件的字节码结构
深入探索编译插桩技术(四、ASM 探秘)

stm32F407-------DAC数模转换

Batch obtain the latitude coordinates of all administrative regions in China (to the county level)

Dell Notebook Periodic Flash Screen Fault

Telerik UI 2022 R2 SP1 Retail-Not Crack

equals()与hashCode()

深度学习之线性代数

AI super clear repair resurfaces the light in Huang Jiaju's eyes, Lecun boss's "deep learning" course survival report, beautiful paintings only need one line of code, AI's latest paper | showmeai info
随机推荐
Address information parsing in one line of code
The printf function is realized through the serial port, and the serial port data reception is realized by interrupt
Advanced learning of MySQL -- basics -- multi table query -- inner join
【批处理DOS-CMD命令-汇总和小结】-跳转、循环、条件命令(goto、errorlevel、if、for[读取、切分、提取字符串]、)cmd命令错误汇总,cmd错误
批量获取中国所有行政区域经边界纬度坐标(到县区级别)
腾讯云 WebShell 体验
JS+SVG爱心扩散动画js特效
Dr selection of OSPF configuration for Huawei devices
Zabbix 5.0:通过LLD方式自动化监控阿里云RDS
View remote test data and records anytime, anywhere -- ipehub2 and ipemotion app
深度学习之线性代数
equals()与hashCode()
第六篇,STM32脉冲宽度调制(PWM)编程
集合(泛型 & List & Set & 自定义排序)
学习光线跟踪一样的自3D表征Ego3RT
ZABBIX 5.0: automatically monitor Alibaba cloud RDS through LLD
Threejs image deformation enlarge full screen animation JS special effect
What is time
通过串口实现printf函数,中断实现串口数据接收
Three methods to realize JS asynchronous loading