ComponentOne Xamarin.iOS Documentation
Controls / FlexGrid / Features / Customize Appearance
In This Topic
    Customize Appearance
    In This Topic

    FlexGrid has various built-in properties to customize grid's appearance. A user can set attributes such as background color, alternating row color, text color, header color, font, selection mode, selected cell color, etc to customize the overall appearance of the FlexGrid control. Moreover, it also allows you to set individual properties for RowHeaderGridLinesVisibility, ColumnHeaderGridLinesVisibility, and TopLeftHeaderGridLinesVisibility that provides more granular styling capabilities that are more suited for Material themes.

    The image below shows customized appearance in FlexGrid.

    The following code example demonstrates how to set style properties to customize grid's appearance. The example uses the sample created in the Quick Start section.

    In Code

    C#
    Copy Code
    grid.SelectionMode = FlexSelectionMode.FlexSelectionModeCell;
    grid.BackgroundColor = UIColor.Black;
    grid.AlternatingRowBackgroundColor = UIColor.Gray;
    grid.TextColor = UIColor.White;
    grid.BorderColor = UIColor.Red;
    grid.ColumnHeaderBackgroundColor = UIColor.White;
    grid.ColumnHeaderTextColor = UIColor.Black;
    grid.RowHeaderGridLinesVisibility = GridLinesVisibility.Vertical;