AppearanceObject.Font Property

Gets or sets the font used to paint the text.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v21.1.dll


public virtual Font Font { get; set; }

Property Value

Type Description

A Font object specifying the font used to display the contents of elements.


Setting the Font property to the control’s default font which is currently used by the user’s operating system automatically sets the appearance object’s AppearanceOptions.UseFont property to false. If this property is set to false and the current appearance object has a parent, the parent’s font settings are used.

Use the AppearanceObject.GetFont method to obtain the font settings specified by the appearance object’s settings.

When an AppearanceObject’s style setting (for example, BackColor, ForeColor, Font and TextOptions.HAlignment) is set to a non-default value, the corresponding Options.Use… option (for instance, Options.UseBackColor, Options.UseForeColor, Options.UseFont and Options.UseTextOptions) is automatically set to true in the following cases:

  • The AppearanceObject belongs to a control/component (or its element), and this control/component has been completely loaded (see the control’s IsLoading property to check the load status);
  • The AppearanceObject belongs to a grid column/band or tree list column/band, and the column/band belongs to a grid/tree list control;
  • The AppearanceObject is standalone, that is, it does not belong to any control or component.

In other cases, the Options.Use… options are not automatically enabled. You may need to enable these options manually for the style settings to be in effect.

See Also