TreeView does not display items past a certain point even though the control has plenty of height

I am using a WinUI SfTreeView inside of a grid. The TreeView will only use a certain amount of height to display items even though the height is taking all available window height. I can also set the MinHeight to a ridiculously large amount and the TreeView will not use all of the height. When I expand or collapse a node, it seems to change the height that is being used to display the tree and it never displays the whole structure. If I set AutoExpandMode="AllNodes" the tree initial displays fine, but when I collapse a node the tree starts to not display after a certain point.
I put borders around the grid and SfTreeView to make sure they are the correct height, but the SfTreeView will not use all the height after you begin collapsing nodes.

Here is the code:

    <Grid

          BorderBrush="Green"

            BorderThickness="2">

        <Grid.ColumnDefinitions>

            <ColumnDefinition Width="*" />

        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>

            <RowDefinition Height="*" />

        </Grid.RowDefinitions>



        <treeView:SfTreeView

            BorderBrush="Red"

            BorderThickness="2"

            Grid.Column="0" Grid.Row="1"

            x:Name="TmfFolderTree"

            ChildPropertyName="ChildItems"

            AllowEditing="True"

            SelectionMode="Single"

            ShowLines="false"

            HorizontalAlignment="Stretch"

            VerticalAlignment="Stretch"

            IsAnimationEnabled="False"

            AutoExpandMode="RootNodes"

            ItemTemplate="{StaticResource NodeTemplate}"

            ItemsSource="{x:Bind ViewModel.TmfFolders, Mode=TwoWay}" />


    </Grid>



3 Replies

MS Malini Selvarasu Syncfusion Team May 16, 2025 02:18 PM UTC

Hi Jason Lindemann,

We have analyzed your issue but would like to clarify your requirement further. It appears that you expect the TreeView items to always adjust according to the TreeView’s height. By default, each TreeView node has a height of 40, which controls how the nodes are displayed within the available height. If you wish to customize the height of the TreeView items, please refer to the relevant section in the user guide linked below.
If we have misunderstood your request or if your requirements differ, kindly provide additional details along with a video demonstrating the issue you are encountering. This will help us better understand your needs and offer a more tailored solution.
Thank you for your cooperation and understanding.
Regards,
Malini Selvarasu


JL Jason Lindemann May 16, 2025 06:06 PM UTC

The issues is not with the height of each item, it is with the height of the control, the entire control is not using the available height. 
I created the ticket: https://support.syncfusion.com/support/tickets/727337



SB Sweatha Bharathi Syncfusion Team May 19, 2025 12:37 PM UTC

Hi Jason Lindemann,



We regret the inconvenience. You can follow the ticket you have created for further updates.


Regards,
Sweatha.B

Loader.
Up arrow icon