2X faster development
The ultimate WPF UI toolkit to boost your development speed.
The header text width is calculated with static font size in WPF DataGrid (SfDataGrid) and you can change the header font size using HeaderStyle property. You can achieve this by overriding GetFormattedText method in SfDataGrid.ColumnSizer class. this.DataGrid.GridColumnSizer = new GridColumnSizerExt(DataGrid);public class GridColumnSizerExt : GridColumnSizer { public GridColumnSizerExt(SfDataGrid dataGrid) : base(dataGrid) { } protected override FormattedText GetFormattedText(GridColumn column, object record, string displayText) { var formattedText = base.GetFormattedText(column, record, displayText); if (record == null) { formattedText.SetFontSize(16); } return formattedText; } } |
2X faster development
The ultimate WPF UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.