I've implemented a solution as proposed by Alex from the following post: http://blogs.infragistics.com/forums/t/43348.aspx
Within this post "cwills55" asks a question about the following spaces that was never answered:
I've used snoop to tell me that this location even when not expanded is taken by a "CellValuePresenter". I set the visibility of the CellValuePresenter to collapsed. This removes the CellValuePresenter from the visual tree but leaves the undesired margin/padding behind.
Can someone help me determine where this space is coming from and how to remove it? Thanks in advance.
Hello,
Thank you for your post. I have been through it and the sample project Alex has created and I modified it, so now it look as you want. Basically I added a DataTrigger for the DataRecordCellArea and set its Height explicitly, if the Record is not selected and the custom CellVAluePresenter is Collapsed. Please let me know if this helps you or you need further clarifications on this matter.
Looking forward for your reply.
Thanks much for the reply. While this solution works it feels brittle to me.
What if I want to use a DataTemplateSelector inside the cellValuePresenter style. Each template contains different icons or pictures that vary in height depending upon a property on the DataItem. I have to create a mirror dataTemplateSelector for the DataRecordCellArea and figure out manually what the height properties for each should be.
I was hoping for something a little more dynamic... Any additional tips/tricks that would make the resizing automatically fit to content?
Thanks,
Daniel