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 Ryan,
I have modified the sample I attached before, so now the Height is set via Binding to the first Record’s ActualHeight. I used converter in order to calculate the Height.
Looking forward for your reply.
Hey guys,
We're also having this problem... and setting the height to a static value is kind of a hacky solution :/
If the user had larger text or like-wise on their computer, the static height would not allow for the larger text to be displayed correctly. It would be much better if the height was dynamically linked to something else, like a child cell within the first row of the record. I couldn't figure out how to do this though...
Has anyone come up with a dynamic solution to this?
Cheers,
-Ryan-
Hello Daniel,
I can say that no matter what DataTemplate you use, the DataTrigger will do the trick to remove the spaces, when the CellValuePresenter is Collapsed, but If I think of something more dynamic I will let you know.
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
Hello,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.