Skip to main content

TdxVisualRefinements Class

Stores global DevExpress control appearance settings that complement skins and palettes.

Declaration

TdxVisualRefinements = class(
    TObject
)

Remarks

Clean, simple, and minimalistic UI design is a common trend in modern software development. Global visual refinement settings allow you to address this trend and make the application UI more plain, simple, and readable.

Light Style replaces thick and double borders with lightweight one-pixel borders and adds extra padding to all cells and column headers in VCL Data Grid.

VCL Express Library: Light Style in Data Grid

Main API Members

The list below outlines key members of the TdxVisualRefinements class that allow you to manage extra paddings and Light Style settings.

Global Extra Padding Settings

HeaderPadding | Padding
Allow you to adjust extra cell and header paddings in container controls to improve UI readability.
UsePaddingForStandaloneEditors

Specifies if extra cell paddings affect standalone DevExpress editors.

The ApplyLightStyle procedure can accept a new UsePaddingForStandaloneEditors property value as an optional parameter.

Global UI Glyph Settings

UseDisabledSkinPaletteForSVG | UseEnabledSkinPaletteForSVG
Specify if the active vector skin palette defines SVG glyph colors in UI elements.
ApplyLightStyle
Applies Light Style effects to all DevExpress controls that support them.
LightBorders
Specifies if all supported DevExpress controls display lightweight borders.

General-Purpose API Members

BeginUpdate | EndUpdate
Allow you to avoid excessive redraw operations during batch visual refinement changes.
Reset

Resets all global visual refinement settings.

Tip

You can call the Reset procedure to disable all Light Style effects.

Code Example: Padding Size Adjustments

You can adjust the default padding dimensions for all container controls in the initialization section of the main application unit.

VCL Express Library: Data Grid with Default Header and Cell Paddings

The following code example adds 5 pixels to left and right paddings, and 2 pixels to top and bottom paddings in container controls and standalone editors:

uses
  Forms,
  cxLookAndFeels, // Adds the cxLookAndFeels unit to use the TdxVisualRefinements class
// ...
begin
  TdxVisualRefinements.BeginUpdate;  // Initiates the following batch change
  try
    TdxVisualRefinements.Padding := Rect(5, 2, 5, 2);
    TdxVisualRefinements.UsePaddingForStandaloneEditors := True;
  finally
    TdxVisualRefinements.EndUpdate;  // Calls EndUpdate regardless of the batch operation's success
  end;
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TMyForm, MyForm);
  Application.Run;
end.

VCL Express Library: Data Grid with Custom Header and Cell Paddings

Supported Controls and Limitations

Only VCL Data Grid supports all components of Light Style including lightweight borders.

Note

All visual refinement settings have no effect if the WXI or WXI Compact skin is active.

Cell and Header Padding Adjustments

Cell and header padding adjustments affect only the following controls:

TcxGrid
A Data Grid control.
TcxVerticalGrid
The vertical grid control that implements single record and banded layouts.
TcxRTTIInspector
A runtime Object Inspector control.
TcxTreeList
A control that displays data in a tree-like manner.
TcxDBTreeList
A data-aware Tree List control.
TcxVirtualTreeList
A TreeList control used in provider mode.
TcxPivotGrid
An unbound Pivot Grid control.
TcxDBPivotGrid
A data-aware Pivot Grid control.

Note

Padding adjustments also affect standalone editors if the UsePaddingForStandaloneEditors property is set to True.

Inheritance

TObject
TdxVisualRefinements
See Also