Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Expand]Controls and Libraries
 [Collapse]Common Features
  [Expand]Data Binding Common Concepts
  [Expand]Data Source Wizard
  [Expand]Expressions
  [Expand]Behaviors
  [Collapse]Application Appearance
    Default Application Font
    Appearances
   [Expand]Look And Feel
    Glyph Skinning
  [Expand]Filtering UI Context
  [Expand]High DPI Support
  [Expand]Scaffolding Wizard
  [Expand]Formatting Values
   HTML Text Formatting
  [Expand]Menus
  [Expand]Tooltip Management
  [Expand]Saving and Restoring 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]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Default Application Font

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

Changing the DevExpress controls' default font prior to running the main application form as demonstrated in the example below is highly recommended.

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 WindowsFormsSettings.DefaultMenuFont static 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 WindowsFormsSettings.DefaultMenuFont and WindowsFormsSettings.DefaultFont static properties.

For more information, see Bar and Docking Controllers.

How would you rate this topic?​​​​​​​