Skip to main content

RibbonPageCategoryOptions.AutoCorrectForeColor Property

Gets or sets whether Ribbon categories automatically adjust their forecolors depending on a background color. Fore colors are adjusted when a contrast between fore and background colors is too low.

Namespace: DevExpress.XtraBars.Ribbon

Assembly: DevExpress.XtraBars.v22.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Appearance")]
[XtraSerializableProperty]
public DefaultBoolean AutoCorrectForeColor { get; set; }

Property Value

Type Default Description
DefaultBoolean Default

DefaultBoolean.False or DefaultBoolean.Default if categories should use text fore colors assigned to their Appearance.ForeColor properties (or use a default skin color for categories with no custom color assigned). DefaultBoolean.True if categories should automatically change their caption fore colors.

Available values:

Name Description
True

true. DefaultBoolean.True has a constant value of 0, while the standard true value corresponds to a value of 1. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

False

false. DefaultBoolean.False has a constant value of 1, while the standard false value corresponds to a value of 0. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

Default

The default behavior determined by the control’s logic.

Property Paths

You can access this nested property as listed below:

Object Type Path to AutoCorrectForeColor
RibbonControl
.OptionsPageCategories.AutoCorrectForeColor

Remarks

The figure below illustrates how two Ribbon categories with LightPink and Gainsboro background colors change their fore color from light to dark when the AutoCorrectForeColor setting is enabled. The active skin is “Basic”.

rcat-colors

See Also