How to make text wrap in a WPF TreeViewItem?
问题 This time, my question is as simple as it sounds... how do you get text to wrap in a WPF TreeViewItem ? I have a simple HierarchicalDataTemplate with just one TextBlock in it. <TextBlock Text="{Binding Value}" TextWrapping="Wrap" /> The text does not wrap. I tried binding the Width of the TextBlock to the ActualWidth of the TreeView , but although that makes the text wrap, the Width of the TreeViewItem does not fit in the TreeView because the TreeView has Padding . Binding to the ActualWidth