Jak zawijać zawartość TextBlock w TreeView?

mamTreeView, który wyświetla niektóre dane za pomocą szablonów danych. Oto XAML:

    <TreeView Grid.Row="0" ItemsSource="{Binding Railways}" x:Name="tvDatawareObjects"
              ScrollViewer.HorizontalScrollBarVisibility="Disabled">
        <TreeView.ItemContainerStyle>
            <Style TargetType="{x:Type TreeViewItem}">
                <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
                <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
            </Style>
        </TreeView.ItemContainerStyle>
        <TreeView.Resources>
<!-- other templates here... -->
            <HierarchicalDataTemplate DataType="{x:Type viewModels:ProjectViewModel}" ItemsSource="{Binding Phases}">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <TextBlock Text="{Binding Model.Code}" FontWeight="DemiBold" />
                    <TextBlock Text="{Binding Model.Title}" TextWrapping="Wrap" Foreground="Gray" Grid.Row="1" />
                </Grid>
            </HierarchicalDataTemplate>

            <HierarchicalDataTemplate DataType="{x:Type viewModels:CollectionViewModel}" ItemsSource="{Binding Items}">
                <TextBlock Text="{Binding CollectionName}" />
            </HierarchicalDataTemplate>
        </TreeView.Resources>
    </TreeView>

Zawijanie tekstu dla<TextBlock Text="{Binding Model.Title}" TextWrapping="Wrap" Foreground="Gray" Grid.Row="1" /> nie działa. Co ja robię źle?

questionAnswers(3)

yourAnswerToTheQuestion