Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TextBlock TextWrapping not wrapping #2

OK... so this solution doesn't help

XAML is here

  <ListBox  ItemsSource="{Binding Path=ContentItems}" Background="White" >
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid Margin="2" Height="Auto" Width="Auto">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Grid Grid.Column="0">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <StackPanel Grid.Row="0" Orientation="Horizontal">
                                    <Label VerticalAlignment="Center"  Margin="0,0,0,5">Start</Label><svl:TimeEditor Value="{Binding Path=FormatedStart}" Width="87"  HorizontalAlignment="Left"  Margin="2,8"  Name="dtpStart" FontSize="12"  Height="25"  VerticalAlignment="Center"     />
                                    <Label VerticalAlignment="Center"  Margin="0,0,0,5">End</Label><svl:TimeEditor Value="{Binding Path=FormatedEnd}" Width="87"  HorizontalAlignment="Left"  Margin="2,8"  Name="dtpEnd" FontSize="12"  Height="25"  VerticalAlignment="Center"     />
                                </StackPanel>                               
                                <TextBlock Grid.Row="1"  TextWrapping="Wrap"  Name="tbText" Text="{Binding Path=Data}"></TextBlock>
                            </Grid>
                            <Grid Grid.Column="1" Visibility="Collapsed">
                            </Grid>
                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
like image 661
Friend Avatar asked Nov 30 '22 01:11

Friend


1 Answers

The following will helps for text wrapping:

<ListBox ScrollViewer.HorizontalScrollBarVisibility="Disabled">
like image 162
Nandha kumar Avatar answered Dec 05 '22 09:12

Nandha kumar