zl程序教程

您现在的位置是:首页 >  其它

当前栏目

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

所有 一款 窗体 devexpress 皮肤 使用
2023-09-11 14:14:22 时间

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.