ThemeFontAttributes.FontSizeFromNamedSize(NamedSize) Method

Converts the Xamarin.Forms.NamedSize enumeration's member to a double value.

Namespace: DevExpress.Mobile.DataGrid

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


public static double FontSizeFromNamedSize(
    NamedSize size
Public Shared Function FontSizeFromNamedSize(
    size As NamedSize
) As Double


Name Type Description
size Xamarin.Forms.NamedSize

The Xamarin.Forms.NamedSize enumeration's member to be converted.


Type Description

A double value that corresponds to a specified named size (large, small, etc.).



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.

You can use the value returned by the FontSizeFromNamedSize method to specify sizes for new ThemeFontAttributes instances (see the example below).


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.


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

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


See Also