Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3220
xamDataTree Auto Height in StackPanel issue
posted

Hello,

when I place my datatree control inside a StackPanel, the height of the control is cut.

When clicking somewhere it is shown in full height. See image below:

Is there a way to force the tree control to refresh or rearrange its actual size?

  • 34830
    Offline posted

    Hello Bin,

    I have been investigating into the behavior you are reporting, and while I have not been able to reproduce the behavior you are seeing, I do have a couple of recommendations for you on this matter.

    First, I have to ask if there is a particular reason why you are placing the XamDataTree within a StackPanel? The StackPanel measures with an infinite height by default, and this can lead to issues with scrolling and virtualization of the XamDataTree’s nodes, and as such I generally would not recommend doing this.

    With the above said, if you would like to try to force the XamDataTree to refresh or rearrange its actual size, you can try calling the InvalidateMeasure and InvalidateArrange methods of the tree. This may help, but without being able to reproduce the behavior you are seeing, I cannot be certain of this. It may be helpful if this does not help if you can please provide an isolated sample project that demonstrates the behavior you are seeing.

    Please let me know if you have any other questions or concerns on this matter.