- 2 minutes to read
The vertical grid controls (VGridControl and PropertyGridControl) enable you to modify the appearance settings of their elements in a number of ways. Modifying appearances means modifying attributes such as background and foreground colors, font settings, alignment, etc.
Each Appearance has its own priority. See this help topic for information on how to change this default appearance priority: Application Appearance and Skin Colors.
Note this is not the only way to change the control’s appearances. Please refer to the Look And Feel and Skinning, Custom Painting and Alpha Blending and Background Images documents for additional information on modifying the appearances of visual elements.
Appearances and Appearance Settings
All DevExpress .NET Windows Forms controls use Appearances to customize their look and feel.
A vertical grid control stores a collection of appearance objects each of which specifies style settings used to paint the control’s various elements. This collection can be accessed via the VGridControlBase.Appearance property. An object that stores appearance settings for a specific element is represented by the AppearanceObject class. Its properties specify the background and foreground colors, gradient background, font, pen, brush and other style characteristics that are used to paint a particular element. For a list of the settings provided by appearance objects, see the Appearances document.
The following image shows the collection of appearance objects for the grid control:
The collection of appearance objects can also be accessed at design time using the Appearance Page page of the VerticalGrid Designer. See the image below.
Methods of Customizing Appearances
There are several ways of customizing appearances of a vertical grid’s elements. These are listed below:
You can use this method to modify appearance settings of individual category rows or the data cells of individual editor and multi-editor rows.
This method enables you to modify appearance settings of data cell displayed by the vertical grid control.
This is the most flexible way to customize appearance settings. It implies handling custom painting events that fire for each element before it is painted. Thus, you can provide appearances for elements depenfing on their state, position, etc.