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
170
XamTreeGrid Row Height
posted

First, I would say XamTreeGrid is a fantastic control ; this a common UI need in our application. We achieved all we had expected except one thing : resizing row height based on a condition.

We have a simple case that says :

If Node has children, Row Heigtht is 25 ; if not Row Height is 50. I tried everything, redefine CellValuePresenterStyle, DataRecordPresenterStyle, DataRecordCellAreaStyle, nothing works. We cannot use DataRecordSizingMode, cause the sizing does not depend on text Content (Wrapping) but on a cell template (a grid with 3 rows).

If you have an idea, I take it. Thanks

Stéphane

  • 22015
    posted

    Hello Stéphane,

     

    Thank you for your post!

     

    I have been looking into it and want to thank you for the feedback provided on our controls. I am glad that the XamTreeGrid has met most of your expectations.

     

    Regarding your question - you can create a style for the TreeCellValuePresenter. This is the present for the tree cells. In the style you can create a Setter for the Height property and assign 50 as value.

    Then you create a Trigger in the style and check if the ExpansionIndicatorVisibility property is set to Visible. When the ExpansionIndicator next to the cell is visible it means that the node has children.

     

    I have created a small sample application for you to show you the above mentioned functionality. Please find the attachment and feel free to let me know if you have any further questions on this matter.

    TreeGrid_RowHeight.zip