Skip to main content

WindowsFormsSettings.FontBehavior Property

Gets or sets the behavior specifying fonts used by DevExpress and standard .NET controls. This is a static property. Setting this property modifies the WindowsFormsSettings.DefaultFont property.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.Utils.v24.2.dll

Declaration

public static WindowsFormsFontBehavior FontBehavior { get; set; }

Property Value

Type Description
DevExpress.XtraEditors.WindowsFormsFontBehavior

A DevExpress.XtraEditors.WindowsFormsFontBehavior enumeration value that specifies the behavior specifying fonts used by DevExpress and standard .NET controls.

Remarks

Use the FontBehavior property to specify the fonts used by DevExpress and standard .NET controls.

When this property is set to any value except WindowsFormsFontBehavior.Default, a corresponding font is automatically assigned to the WindowsFormsSettings.DefaultFont property. The WindowsFormsFontBehavior enumeration provides the following modes.

Value Description
Default DevExpress controls use the WindowsFormsSettings.DefaultFont font.
UseTahoma DevExpress controls use the Tahoma font of the default system font size (SystemFonts.DefaultFont.Size).
UseWindowsFont DevExpress controls use the System.Drawing.SystemFonts.MessageBoxFont system font.
UseControlFont DevExpress controls use the System.Drawing.SystemFonts.DefaultFont system font.
UseSegoeUI DevExpress controls use the “Segoe UI” font.
ForceTahoma Forces standard .NET and DevExpress controls to use the Tahoma font of the default system font size (SystemFonts.DefaultFont.Size).
ForceWindowsFont Forces standard .NET and DevExpress controls to use the System.Drawing.SystemFonts.MessageBoxFont system font.
ForceSegoeUI Forces standard .NET and DevExpress controls to use the “Segoe UI” font.

Note

You can also specify fonts for controls using the application settings architecture. This allows you to separate application settings from the application code and provide consistency between design and run time. See the WindowsFormsSettings.LoadApplicationSettings method for details.

See Also