[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Expand]Controls and Libraries
 [Collapse]Common Features
  [Expand]Data Binding Common Concepts
  [Expand]Data Source Wizard
  [Collapse]Application Appearance and Skin Colors
    Default Application Font
   [Expand]Look and Feel
    Glyph Skinning
  [Expand]Filtering UI Context
   Find Panel Syntax
  [Expand]Graphics Performance and High DPI
  [Expand]Scaffolding Wizard
  [Expand]Formatting Values
   HTML-inspired Text Formatting
  [Expand]Save and Restore Layouts
   Clipboard - Copy and Paste Operations. Data Formatting
   Version Compatibility: Default Property Values
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Default Application Font

By default, DevExpress Windows Forms controls use the Tahoma font (as specified by the static WindowsFormsSettings.FontBehavior property) of the default system font size. You can change the default font used by the controls with the following static properties.

We highly recommend that you use the DevExpress Project Settings dialog to change the default font for DevExpress controls.

If you need to change the default font in code, do that prior to running the main application form (see the sample below). Once a default font is set, do not change it when the application is running.

Compared to DevExpress controls, standard Windows Forms controls use a different default font. The WindowsFormsSettings.FontBehavior property introduces several modes that help you force the DevExpress and standard controls to use the same font. Other FontBehavior modes allow you to apply one of the system fonts to DevExpress controls.

The DefaultFont and FontBehavior property values can be specified in a configuration file beforehand and then loaded at runtime using the WindowsFormsSettings.LoadApplicationSettings method. See this topic to learn more.

Expanded Fonts of Individual Controls

If you'd like to only change a certain control's font, use the AppearanceObject.Font setting provided by the control's appearance property (typically, appearance properties have the "Appearance" sub-string in their names). Make a note that some controls consist of multiple visual elements. These controls expose multiple appearance properties for all their elements. If this is the case, the font settings need to be changed across all the appearance properties provided by the control.

For instance, the following code shows how to change the font of all visual elements of a GridControl's GridView, which consist of multiple elements.

The AppearanceObject objects also provide two special properties to adjust a control's font.

Expanded Fonts of XtraBars Elements (Menus, Bars, Ribbon UI and Dock Panels)

As mentioned above, the default font of DevExpress menus, toolbars and popup menus can be customized using the static WindowsFormsSettings.DefaultMenuFont property. The default font of Ribbon items and dock panels is specified by the WindowsFormsSettings.DefaultFont property.

A more flexible alternative to specifying the default font of XtraBars Elements is using Bar And Docking Controllers:

Bar And Docking Controllers expose the following appearance and font customization properties:

The following code changes the default font of main menus throughout the application using the Default Bar And Docking Controller.

The Appearance... properties of Bar And Docking Controllers take priority over the static WindowsFormsSettings.DefaultMenuFont and WindowsFormsSettings.DefaultFont properties.

For more information, see Bar and Docking Controllers (Customizing Default View and Behavior Settings).

Is this topic helpful?​​​​​​​