GridControl.SwitchPaintStyle(String) Method

Applies the specified paint style to all Views.

Namespace: DevExpress.XtraGrid

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

public virtual void SwitchPaintStyle(
    string newPaintStyleName
)
Public Overridable Sub SwitchPaintStyle(
    newPaintStyleName As String
)

Parameters

Name Type Description
newPaintStyleName String

A string value specifying the paint style name.

Remarks

Each View provides the BaseView.PaintStyleName property which specifies how scrollbars, headers, borders, buttons and other elements are painted. The SwitchPaintStyle method changes the BaseView.PaintStyleName property of all Views to the specified parameter value. These Views include the GridControl.MainView, pattern Views stored within the GridControl.LevelTree hashtable and currently expanded detail clones residing within the GridControl.Views collection.

The following strings can be passed as a parameter.

  • "Default". The appearance of grid elements is specified by the grid's GridControl.LookAndFeel property.
  • "WindowsXP"
  • "MixedXP"
  • "Style3D"
  • "UltraFlat"
  • "Flat"

If any other string is specified, the "Flat" style is applied to all Views.

Please refer to the Appearance and Conditional Formatting topic for details and paint style samples.

See Also