DevExpress所有的窗体,使用同一款皮肤

本文介绍如何使用DevExpress库中的XtraForm类实现窗体的皮肤管理功能。主要包括:将窗体继承自XtraForm类;调用SkinManager.EnableFormSkins及SkinManager.EnableMdiFormSkins方法使窗体支持换肤;利用DefaultLookAndFeel组件或UserLookAndFeel.Default属性设置默认皮肤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://www.devexpress.com/Support/Center/Question/Details/K18516

To accomplish your task, please execute the following steps:

1. Make all forms (parent and child) successors from the XtraForm Class . By default, they are inherited from the standard Form class. Our XtraForm is just a regular form that supports our Look and Feel Mechanism, so there will be no need to additionally change your code.

2. Then, you need to call SkinManager.EnableFormSkins and SkinManager.EnableMdiFormSkins methods before your form is shown to make our forms skinned. The Form Title Bar Skinning article describes how to do this.

3. Now all your forms use a default skin. To specify an application's skin at design time, please use our DefaultLookAndFeel component. Just drop it onto the main form and customize its properties as needed. To easily change the application's skin programmatically from any place in your application, you can use the UserLookAndFeel.Default static property. So, you do not need to refer to the parent form from the child one just to change the application's skin.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值