Styling and Appearance
RadVirtualGrid is designed to handle huge amounts of data while keeping its performance and overall user experience intact. Thus, the control does not utilize the common templating mechanism provided by WPF and does not add its visual elements to the visual tree. It provides a set of properties for customizing its appearance.
When updating the visual properties for the headers of the control at runtime, the UpdateHeadersUI method needs to be called. For any other modifications of the visual properties at runtime, the UpdateUI method is to be called.
Background: Sets the Background of the cell.
Foreground: Sets the Foreground of the cell.
ColumnWidth: Sets the Width of the Columns. The property is of type double.
RowHeight: Sets the Height of the Rows. The property is of type double.
ColumnHeaderHeight: Sets the Height of the Column Headers. The property is of type double.
RowHeaderWidth: Sets the Width of the Row Headers. The property is of type double.
LinesVisibility: This property controls the way lines of the grid are visualized. It is an enumeration that has four values to choose from: Both, Horizontal, Vertical and None.
FontFamily: Sets the FontFamily of the cell.
FontSize: Sets the FontSize of the cell content.The property is of type double.
CellPadding: Gets or sets a value that indicates the cells' text padding.
CellTextAlignment: An enumeration property, which value can be set to the one of the following ones: Left, Right, Center, Justify.
The ability to use the CellTextAlignment mechanism depends on the value of the MeasureTextOnRender property. More information can be found in the Getting Started topic.
The styling options of the control support applying Brushes to various of its elements. They are described in the following figure.
Figure 1: RadVirtualGrid's Visual Elements
The full set of properties is listed below.
HorizontalLinesBrush
VerticalLinesBrush
RowHeaderBackground
PinnedRowHeaderBackground
PinnedRowHeaderBackground
RowHeaderForeground
ColumnHeaderForeground
CurrentCellStroke
PinnedCellBackground
PinnedCellForeground
RowHeaderLinesBrush
ColumnHeaderLinesBrush