ThemeFontAttributes(String, Double, FontAttributes, Color) Constructor

Initializes a new instance of the ThemeFontAttributes class.

Namespace: DevExpress.Mobile.DataGrid

Assembly: DevExpress.Mobile.Grid.v18.2.dll

Declaration

public ThemeFontAttributes(
    string family,
    double size,
    FontAttributes attributes,
    Color color
)
Public Sub New(
    family As String,
    size As Double,
    attributes As FontAttributes,
    color As Color
)

Parameters

Name Type Description
family String

A string value that specifies the name of the required font family. This value is assigned to the ThemeFontAttributes.Family property.

size Double

A double value that specifies the size of the required font. This value is assigned to the ThemeFontAttributes.Size property.

attributes Xamarin.Forms.FontAttributes

A Xamarin.Forms.FontAttributes enumeration member that specifies the font style (bold, italic, etc.). This value is assigned to the ThemeFontAttributes.Attributes property.

color Xamarin.Forms.Color

A Xamarin.Forms.Color object that specifies the font color. This value is assigned to the ThemeFontAttributes.Color property.

Remarks

IMPORTANT

This documentation topic describes legacy technology. We no longer develop new functionality for the GridControl and suggest that you use the new DataGridView control instead.

Instances of the ThemeFontAttributes class are automatically created, initialized and passed to the corresponding event handlers.

Examples

This example demonstrates how to customize a theme used to paint a GridControl.

To apply a theme to a GridControl, assign its name to the ThemeManager.ThemeName property. The Themes class stores available theme names.

The ThemeBase class's properties provide access to different customizers, which you can adjust to change appearance settings (for example, font attributes, border and background colors, etc.) of the grid's corresponding visual elements (such as data cells, group rows, filter panel, etc.). In this example, the following customizers are used.

IMPORTANT

To apply the customization, call the ThemeManager.RefreshTheme method.

This example customizes the Light theme as it is shown in the image below.

Grid_Customizing

See Also