Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HierarchicalExpanderColumn is truncated when scrolling up/down if template is composite #280

Open
perfect100 opened this issue Apr 8, 2024 · 2 comments

Comments

@perfect100
Copy link

perfect100 commented Apr 8, 2024

Hi there:
I've defined a HierarchicalExpanderColumn with Template in a TreeDataGrid.
If the template is simple:

<DataTemplate x:Key="FirstColumnHeaderKey"  x:CompileBindings="False">
    <TextBlock Text="{Binding ., Converter={StaticResource TreeNodeNameConverter}}" Margin="2" />
</DataTemplate>

It works well.

However, if the template is more complicated:

<DataTemplate x:Key="FirstColumnHeaderKey" x:CompileBindings="False">
    <DockPanel VerticalAlignment="Center" HorizontalAlignment="Left" Margin="2">
        <Image Source="{Binding ., Converter={StaticResource TreeNodeIconConverter}}" Height="18" Width="18" DockPanel.Dock="Left"/>
            <TextBlock Text="{Binding ., Converter={StaticResource TreeNodeNameConverter}}" Margin="2" />
    </DockPanel>
</DataTemplate>

The TextBlock's Text has been truncated if I scroll down and then scroll up (randomly).
image
The fourth row content shoud be DYNAM, but sometimes DYNA OR DYN, the text is unstable.
If I resize the colum, it looks good.

The expected UI should be like this:
image

Does it relate to the virtualization of TreeDataGrid?

@perfect100
Copy link
Author

So how can I bypass the issue?
Or force refresh the UI in a timer? So odd...
Any ideas?

@perfect100 perfect100 changed the title HierarchicalExpanderColumn is truncated when scrolling up/down if template is complicated HierarchicalExpanderColumn is truncated when scrolling up/down if template is composite May 29, 2024
@perfect100
Copy link
Author

Hi @maxkatz6 , do you have any thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant