Skip to main content

RepositoryItem.Appearance Property

Gets appearance settings used to paint the editor when it is enabled.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v25.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Appearance")]
public virtual AppearanceObject Appearance { get; }

Property Value

Type Description
AppearanceObject

A AppearanceObject object that contains appearance setting used to paint the editor when it is enabled.

Remarks

Use the Appearance property to specify the editor’s background and foreground colors, font settings, etc.

To specify the appearance settings used to paint the disabled editor, use the RepositoryItem.AppearanceDisabled property. Additionally, it’s possible to specify the appearance of the currently focused editor. Use the RepositoryItem.AppearanceFocused property for this purpose.

Read the following topic for additional information: Application Appearance and Skin Colors.

Important

In Advanced Mode or when the WXI Skin is applied, use the Appearance.BackColor property to specify the editor’s background color. Other appearance settings that specify the background color of the editor in different states are ignored (for example, the AppearanceReadOnly.BackColor, AppearanceFocused.BackColor, AppearanceDisabled.BackColor).

if (textEdit1.Properties.ReadOnly) {
    textEdit1.Properties.Appearance.BackColor = Color.LightGray;
}

Specific Notes

  • Use either the Appearance.TextOptions.HAlignment property or the align HTML attribute to specify the horizontal alignment. These settings are incompatible and cannot be used together.
  • If the editor is used in a data-aware control, use the column’s AppearanceCell.TextOptions.HAlignment property to specify the horizontal alignment when the editor is inactive:

    column.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
    
See Also