Hi,
One of the requirements of my application is to let the user change the font size on the fly. I user a slider for the font size and the FontSize property of the window is bound to its value. This works great (almost), since the controls all take that value.The ribbon, labels, the dock manager, everything resizes correctly. Different story for the XamDataGrid. The column headers resize correctly (i.e. if I increase the font size, the headers' height increases as well). This does not work for the actual record rows, however. The font size increases, but the rows remain at the same height, chopping off the characters displayed in the cells. I tried setting CellHeight to Auto, but that property only accepts numeric values.
Is there any way to get the record rows to increase their height when the font size changes??
Thanks,Michel
Hi Michel,
I tested this out. It appears that the record heights adjust appropriately if the grid's AutoFit property is set to true, but not otherwise. I suggest you report this issue to our Developer Support group so that it can be addressed and you will be notified when it is resolved. Sorry for the inconvenience.
Josh
Hi Josh,
Tried that this afternoon and it does resize the row height. Unfortunately, AutoFit=True is the incarnation of pure evil. You lose your column settings (my grid only has 3 columns - two short ones and a long one, so I tricked it into always making the last one use whatever remaining space there is.) AutoFit makes them all the same width.
Now I'm thinking about devious schemes like calculating a new height whenever the font size changes and changing the height on the fly (which is what I'm doing with the column widths), I'm just not sure I'm courageous enough to get into that - I hate font metrics and other spacing calculations, there's always a little tidbit missing and the result doesn't look quite "natural".
In the meantime, I'll submit a bug report. We don't have to go into production with this for a little while, so with any luck it can be resolve before I have to resort to black magic or something. :)
Michael,
Same experience - AutoFit spells disaster if you have customized the fields within your grid. Did you ever find a way to simply adjust the grid row height ala Excel with a slider or similar?
I upgraded to 9.1 today.
Glenn
I think the issue is resolved in 2009.1.