Changing Text Style
You can change the appearance of the text in the grid by using the Text properties in the C1DataGrid Properties window, through XAML, or through code.
At Design Time
To change the font of the grid to Arial 10pt in the Properties window at design time, navigate to the Properties window and change the C1DataGrid.FontFamily property to Arial and the C1DataGrid.FontSize property to 10:
In XAML
For example, to change the font of the grid to Arial 10pt in XAML add FontFamily="Arial" FontSize="10" to the <c1grid:C1DataGrid> tag so that it appears similar to the following:
<c1grid:C1DataGrid Name="c1DataGrid1" ItemsSource="{Binding Path=ProductsDataSet.Products, ElementName=Window, Mode=Default}" FontFamily="Arial" FontSize="10">
In Code
For example, to change the font of the grid to Arial 10pt add the following code to your project:
C1DataGrid1.FontSize = "10"
C1DataGrid1.FontFamily = New System.Windows.Media.FontFamily("Arial")
• C#
c1DataGrid1.FontSize = 10;
c1DataGrid1.FontFamily = new System.Windows.Media.FontFamily("Arial");
Run your project and observe:
The grid content will appear in Arial 10pt font:
|