AppearanceOptions.UseForeColor Property

Gets or sets whether to use the AppearanceObject.ForeColor property value.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v20.1.dll

Declaration

[DefaultValue(false)]
[XtraSerializableProperty]
[DXCategory("Appearance")]
public virtual bool UseForeColor { get; set; }
<DefaultValue(False)>
<XtraSerializableProperty>
<DXCategory("Appearance")>
Public Overridable Property UseForeColor As Boolean

Property Value

Type Default Description
Boolean

false

true to use the AppearanceObject.ForeColor property value; false to use the foreground color specified by the parent appearance object.

Property Paths

You can access this nested property as listed below:

Object Type Path to UseForeColor
AppearanceObject
.Options.UseForeColor
AppearanceObjectEx
.Options.UseForeColor
AppearanceObjectEx
.Options.UseForeColor
DiagramAppearanceObject
.Options.UseForeColor
DiagramAppearanceObject
.Options.UseForeColor
HyperlinkLabelControlAppearanceObject
.Options.UseForeColor
HyperlinkLabelControlAppearanceObject
.Options.UseForeColor
LabelControlAppearanceObject
.Options.UseForeColor

Remarks

If the current appearance object has no parent, the AppearanceObject.ForeColor property value is used regardless of the UseForeColor property setting. Please refer to the Appearance Inheritance Options topic for details.

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