Hi, my app has multiple columns and levels of group columns, with the ability to add or remove columns. When a group column is removed, the header area isn't resizing to the remaining header cells, which results in a huge waste of space for my app. How can I make the header area shrink when columns are removed?
What happens now:
What I want:
I've attached a sample project.
Hello palen,
I have been looking into your question and I can suggest you add the following code line at the end of the body of ‘Button_Click’ event :
MainGrid.HeaderRowHeight = new RowHeight(25);
If you need any further assistance on this matter, feel free to ask.
That does work, thanks. Is there any way for the header to automatically size itself though? In my real app, I've overriding the header template to include a bunch of other things with variable heights, so calculating the ideal height at runtime would take a bit of work.
I can suggest you set the 'HeaderRowHeight' property of the XamGrid to "Dynamic".
That works perfectly, thanks.