Hi,
Can anyone show me how to change the font size of the grid in the code ,or show me sample on how to do this in Xaml? Thanks
xmlns:ig="clr-namespace:Infragistics.Silverlight.Controls;assembly=Infragistics.Silverlight.XamWebGrid.v10.1" xmlns:igPrim="clr-namespace:Infragistics.Silverlight.Controls.Primitives;assembly=Infragistics.Silverlight.XamWebGrid.v10.1" ... <ig:XamWebGrid> <ig:XamWebGrid.CellStyle> <Style TargetType="ig:CellControl"> <Setter Property="FontSize" Value="14" /> </Style> </ig:XamWebGrid.CellStyle> <ig:XamWebGrid.HeaderStyle> <Style TargetType="igPrim:HeaderCellControl"> <Setter Property="FontSize" Value="14" /> </Style> </ig:XamWebGrid.HeaderStyle> </ig:XamWebGrid>
Hello Nikolay,
while
<ig:XamGrid.CellStyle> <Style TargetType="ig:CellControl"> <Setter Property="FontSize" Value="14" /> </Style>
</ig:XamGrid.CellStyle>
certainly works, apparently I can't databind to that property. If I try:
<ig:XamGrid.CellStyle> <Style TargetType="ig:CellControl"> <Setter Property="FontSize" Value="{Binding Path=XamGridCellFontSize}" /> </Style>
it won't work. I find curious that, while any other control would inherit the usercontrol fontsize (with many other properties)the XamGrid won't. It is a problem for me, since I set the FontSize I want to use according to the user's screen resolution .Usually I'm done with 1 line of code (I set the Page or UserControl FontSize and every control in it will inherit it.With the XamGrid I have to hard code the value in Xaml.Am I doing something wrong?
Thank you Nikolay. It worked.