Tile ItemTemplate Wrapping problem

5 posts, 1 answers
  1. Georges
    Georges avatar
    9 posts
    Member since:
    Feb 2014

    Posted 29 Oct 2014 Link to this post

      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>




  2. Georges
    Georges avatar
    9 posts
    Member since:
    Feb 2014

    Posted 30 Oct 2014 in reply to Georges Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Georges
    Georges avatar
    9 posts
    Member since:
    Feb 2014

    Posted 30 Oct 2014 in reply to Georges Link to this post

    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?

  5. Answer
    Maya
    Admin
    Maya avatar
    4062 posts

    Posted 30 Oct 2014 Link to this post

    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.

     
  6. Georges
    Georges avatar
    9 posts
    Member since:
    Feb 2014

    Posted 31 Oct 2014 in reply to Maya Link to this post

    Hello Maya!

    Great! Thanks you again.

Back to Top
UI for WPF is Visual Studio 2017 Ready