This is a migrated thread and some comments may be shown as answers.

Tile ItemTemplate Wrapping problem

4 Answers 155 Views
TileList
This is a migrated thread and some comments may be shown as answers.
Georges
Top achievements
Rank 1
Georges asked on 29 Oct 2014, 04:27 PM
  Hello,

I have a ItemTemplate  with a Textblock with TextWrapping="Wrap". Since I update Telerik to the last version, the text is wrapping not normaly, it doesn't fill all the width of the Textblock. I don't understand why, is there something that change in the Tile Style that make this happen?

Thanks in advance for your help.

<DataTemplate x:Key="DashAppTileItemTemplate">      
        <Grid  VerticalAlignment="Top">
            <Grid.RowDefinitions>
                <RowDefinition Height="50"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Image VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" Source="{Binding Path=Image , Mode=OneWay, TargetNullValue=Category.Image}"  Margin="5,0" />
            <TextBlock VerticalAlignment="Center" Grid.Row="0" Grid.Column="1" Text="{Binding Path=Libelle, Mode=OneWay}" FontSize="18" />
            <TextBlock  Grid.Row="1" Grid.Column="1" Text="This is my very long text" TextWrapping="Wrap" />
        </Grid>
    </DataTemplate>




4 Answers, 1 is accepted

Sort by
0
Georges
Top achievements
Rank 1
answered on 30 Oct 2014, 09:08 AM
Hello,

To complete my request, here is a simplify piece of code that reproduce my issue :

<Window x:Class="WpfApplication5.MainWindow"
        Title="MainWindow" Height="400" Width="800" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Grid>
        <telerik:RadTileList Name="radTileList1" ItemsSource="ListTest">
            <telerik:RadTileList.ItemTemplate>
                <DataTemplate>
                    <Grid>
                        <TextBlock Grid.Row="1" Text="This is the textblock that souldn't be display like this" TextWrapping="Wrap" Background="Red"/>
                    </Grid>
                </DataTemplate>
            </telerik:RadTileList.ItemTemplate>
        </telerik:RadTileList>
    </Grid>
</Window>


Thanks in advance.
0
Georges
Top achievements
Rank 1
answered on 30 Oct 2014, 09:40 AM
I found out that if I bind the width of the textblock to the actualwidth of the parent grid, it is working. If I bind the textblock width the width of the parent grid it is not working, it seems that the width of the textblock is set to Auto.

<DataTemplate>
    <Grid HorizontalAlignment="Stretch" Name="myGrid">
        <TextBlock Width="{Binding Path=ActualWidth, ElementName=myGrid}"  Grid.Row="1" Text="This is the textblock that souldn't be display like this 456784656432132154654321231564564456421321231464546565sqssq" TextWrapping="Wrap" Background="Red"/>
    </Grid>
</DataTemplate>

Is there something in the new version of the radtilelist that make this happen?

0
Accepted
Maya
Telerik team
answered on 30 Oct 2014, 03:46 PM
Hello Georges,

Thanks for reporting this. I resolved the issue and the fix will be available in the internal build coming next Monday. 
I also updated your Telerik points.  



Regards,
Maya
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Georges
Top achievements
Rank 1
answered on 31 Oct 2014, 07:48 AM
Hello Maya!

Great! Thanks you again.

Tags
TileList
Asked by
Georges
Top achievements
Rank 1
Answers by
Georges
Top achievements
Rank 1
Maya
Telerik team
Share this question
or