如何设置flexgrid中的ColumnHeaders的字体为粗体
如题可以采用这种方法,
xaml代码如下
<Grid>
<c1:C1FlexGrid x:Name="grid" KeyActionTab="MoveAcrossOut" KeyActionEnter="MoveAcross" Padding="5">
<c1:C1FlexGridFilterService.FlexGridFilter>
<c1:C1FlexGridFilter></c1:C1FlexGridFilter>
</c1:C1FlexGridFilterService.FlexGridFilter>
</c1:C1FlexGrid>
<Grid x:Name="innerGrid">
<Grid.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="FontWeight" Value="Bold"/>
</Style>
</Grid.Resources>
</Grid>
</Grid>
后台设置样式代码
grid.ColumnHeaders.Resources = innerGrid.Resources;
页:
[1]