Back to Devexpress

WindowsFormsSettings.FontBehavior Property

windowsforms-devexpress-dot-xtraeditors-dot-windowsformssettings-041bb807.md

latest3.5 KB
Original Source

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.v25.2.dll

NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core

Declaration

csharp
public static WindowsFormsFontBehavior FontBehavior { get; set; }
vb
Public Shared Property FontBehavior As WindowsFormsFontBehavior

Property Value

TypeDescription
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.

ValueDescription
DefaultDevExpress controls use the WindowsFormsSettings.DefaultFont font.
UseTahomaDevExpress controls use the Tahoma font of the default system font size (SystemFonts.DefaultFont.Size).
UseWindowsFontDevExpress controls use the System.Drawing.SystemFonts.MessageBoxFont system font.
UseControlFontDevExpress controls use the System.Drawing.SystemFonts.DefaultFont system font.
UseSegoeUIDevExpress controls use the “Segoe UI” font.
ForceTahomaForces standard .NET and DevExpress controls to use the Tahoma font of the default system font size (SystemFonts.DefaultFont.Size).
ForceWindowsFontForces standard .NET and DevExpress controls to use the System.Drawing.SystemFonts.MessageBoxFont system font.
ForceSegoeUIForces 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

DefaultFont

LoadApplicationSettings()

WindowsFormsSettings Class

WindowsFormsSettings Members

DevExpress.XtraEditors Namespace