Controls > FlexGrid > Features > Customize Appearance |
FlexGrid has various built-in properties to customize grid's appearance. User can customize various attributes, such as background color, alternating row color, text color, header color, font, selection mode, selected cell color, etc.
The image below shows customized appearance in FlexGrid after these properties have been set.
The following code example demonstrates how to set this property in C# and XAML. The example uses the sample created in the Quick Start section.
C# |
Copy Code |
---|---|
grid.BackgroundColor = Color.FromHex("#FCF0E5"); grid.AlternatingRowBackgroundColor = Color.FromHex("#DA6CB5"); grid.SelectionMode = GridSelectionMode.Cell; grid.SelectionTextColor = Color.FromHex("#FFFFFF"); grid.ColumnHeaderBackgroundColor = Color.FromHex("#7B7E7D"); grid.ColumnHeaderTextColor= Color.FromHex("#FFFFFF"); grid.SelectionBackgroundColor = Color.FromHex("#FCF0E5"); |
XAML |
Copy Code |
---|---|
<c1:FlexGrid SelectionMode="Cell" BackgroundColor="White" AlternatingRowBackgroundColor="Purple" ColumnHeaderBackgroundColor="Silver" SelectionBackgroundColor="Navy" SelectionTextColor="White" x:Name="grid" AutoGenerateColumns="False"> |