如何修改全部DevExpress控件的字体
引用:https://www.devexpress.com/Support/Center/Question/Details/A2761
You can change the default font used by DevExpress WindowsForms controls with the following static properties:
DevExpress.XtraEditors.WindowsFormsSettings.DefaultFont - Specifies the default font of controls (except menus and toolbars).
DevExpress.XtraEditors.WindowsFormsSettings.DefaultMenuFont - Specifies the default font used by menus and toolbars.
DevExpress.XtraEditors.WindowsFormsSettings.DefaultPrintFont - Specifies the default text font used when printing DevExpress controls.
可以通过修改以下静态属性:
DevExpress.XtraEditors.WindowsFormsSettings.DefaultFont - 指定控件的默认字体,除了菜单(menu)和工具栏(toolbar)
DevExpress.XtraEditors.WindowsFormsSettings.DefaultMenuFont - 指定菜单(menu)和工具栏(toolbar)的默认字体
DevExpress.XtraEditors.WindowsFormsSettings.DefaultPrintFont - 指定打印控件(printing)的默认文本字体
[STAThread]
static void Main() {
DevExpress.XtraEditors.WindowsFormsSettings.DefaultFont = new Font("Courier New", );
Application.Run(new Form1());
}
如果想改变某个控件的字体,需要通过设置AppearanceObject.Font属性(通常,外观属性都有名为“Appearance”的字样)
using DevExpress.Utils;
using DevExpress.XtraGrid.Views.Grid; void SetGridFont(GridView view, Font font) {
foreach(AppearanceObject ap in view.Appearance)
ap.Font = font;
} // USAGE:
SetGridFont(gridView1, new Font("Courier New", ));
最新文章
- LINUX 查看当前系统的内存使用情况
- shell学习--grep1
- 【FOL】第一周
- python 中偏函数 partial 的使用
- Linux系统上安装软件(ftp服务器)
- g++ gcc 的区别
- MySQL教程及经常使用命令1.1
- 全栈开发之HTML快速入门(一)
- windows系统下安装Eclipse for PHP
- Unity存储路径
- xamarin android 汉字转拼音
- SQLNET.AUTHENTICATION_SERVICES操作系统认证登录的设定
- Derive representation formula from Green’s identity
- Linux网络编程学习(四) -----守护进程的建立(第三章)
- ngx_lua_API 指令详解(三)怎样理解 cosocket指令
- mac ssh中文乱码解决
- 微信企业号OAuth2验证接口实例(使用SpringMVC)
- [LeetCode] 674. Longest Continuous Increasing Subsequence_Easy Dynamic Programming
- 解决python3与python2的pip命令冲突问题冲突(window版)
- 20165230 《Java程序设计》实验二(Java面向对象程序设计)实验报告
热门文章
- linkin大话设计模式--抽象工厂
- 【转】几种现代GPS测量方法和技术
- Python推荐算法学习1
- scala 小结(一)
- java.lang.ClassNotFoundException: org.apache.jsp.WEB_002dINF.classes.views.index_jsp 问题解决方法
- WPF中,多key值绑定问题,一个key绑定一个界面上的对象
- iOS-Xcode编码自动补全失效
- 简述TCP网络编程本质
- 洛谷3月月赛 R1 Step! ZERO to ONE
- 2018/2/13 ElasticSearch学习笔记三 自动映射以及创建自动映射模版,ElasticSearch聚合查询