maui-devexpress-dot-maui-dot-datagrid-dot-textcolumnbase-7ff3fd9d.md
Gets or sets the font name for the text in column’s cells. This is a bindable property.
Namespace : DevExpress.Maui.DataGrid
Assembly : DevExpress.Maui.DataGrid.dll
NuGet Package : DevExpress.Maui.DataGrid
public string FontFamily { get; set; }
| Type | Description |
|---|---|
| String |
The font name.
|
To apply a custom font to the cell text, add the font file to your solution, and then assign it to the grid column’s FontFamily property.
This example shows how to use the Verdana font.
Add the font file to your platform-specific projects:
In the App.xaml file, add the following lines to the ResourceDictionary section:
Set the FontFamily property to the key defined for the custom font:
Note
The FontAttributes property affects the default font only. If you need to apply a bold or italic custom font to the text, use the corresponding font style file as described above.
You can also use the BackgroundColor/FontColor properties to configure the background and text color for the column’s cells, and the FontAttributes/FontSize properties to change the font of cells’ text.
To customize the appearance of a specific cell, handle the CustomCellAppearance event.
Use the Padding property to set the text padding for a column’s cells.
The following example shows how to customize the appearance of a specific column in the grid:
<dxg:NumberColumn FontSize="18"
FontColor="Brown"
FontAttributes="Bold"
BackgroundColor="LightGoldenrodYellow" />
See Also