We're looking at your controls and the XamDataGrid for our app. The requirement is to change some basic grid elements such as a style at runtime / and persist the change for the user.
1. We apply a theme (ie Office2013) via the theme manager. Works great.
2. After the theme is applied, how can we change the font size of the xamdatagrid to a number specified by the user?
Thanks!
Hi,You can hook on the slider's event ValueChanged and use the method PerformAutoSize on the Field class there like I have done in the attached sample below.
I hope this helps, if you have any questions do not hesitate to ask.
Thanks,Teodor
Thank you, based on your example I am able to add a slider and change the font size of the grid based on the value of the slider.
One extra question, as the grid font size changes is there a way to make sure that the columns width also adjust to fit the content?
Hi,You just need to change the property FontSize of the xamDataGrid. Changing the property of the control is overriding the style's fontsize from the theme Office2013.
I have attached a sample where I have bind the FontSize property to a comboBox and the user can change it at runtime.