引用: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", ));

最新文章

  1. LINUX 查看当前系统的内存使用情况
  2. shell学习--grep1
  3. 【FOL】第一周
  4. python 中偏函数 partial 的使用
  5. Linux系统上安装软件(ftp服务器)
  6. g++ gcc 的区别
  7. MySQL教程及经常使用命令1.1
  8. 全栈开发之HTML快速入门(一)
  9. windows系统下安装Eclipse for PHP
  10. Unity存储路径
  11. xamarin android 汉字转拼音
  12. SQLNET.AUTHENTICATION_SERVICES操作系统认证登录的设定
  13. Derive representation formula from Green’s identity
  14. Linux网络编程学习(四) -----守护进程的建立(第三章)
  15. ngx_lua_API 指令详解(三)怎样理解 cosocket指令
  16. mac ssh中文乱码解决
  17. 微信企业号OAuth2验证接口实例(使用SpringMVC)
  18. [LeetCode] 674. Longest Continuous Increasing Subsequence_Easy Dynamic Programming
  19. 解决python3与python2的pip命令冲突问题冲突(window版)
  20. 20165230 《Java程序设计》实验二(Java面向对象程序设计)实验报告

热门文章

  1. linkin大话设计模式--抽象工厂
  2. 【转】几种现代GPS测量方法和技术
  3. Python推荐算法学习1
  4. scala 小结(一)
  5. java.lang.ClassNotFoundException: org.apache.jsp.WEB_002dINF.classes.views.index_jsp 问题解决方法
  6. WPF中,多key值绑定问题,一个key绑定一个界面上的对象
  7. iOS-Xcode编码自动补全失效
  8. 简述TCP网络编程本质
  9. 洛谷3月月赛 R1 Step! ZERO to ONE
  10. 2018/2/13 ElasticSearch学习笔记三 自动映射以及创建自动映射模版,ElasticSearch聚合查询