Wrap text in RadHubTile

4 posts, 1 answers
  1. Ralf
    Ralf avatar
    3 posts
    Member since:
    May 2013

    Posted 07 Apr 2014 Link to this post

    Hello,

    I would like to be able to wrap the text of the Title in a RadHubTile.
    I've tried http://www.telerik.com/forums/radhubtile-wrap-title but to no success in my Windows Phone 8 app. 
    Is it possible?
  2. Answer
    Victor
    Admin
    Victor avatar
    1351 posts

    Posted 10 Apr 2014 Link to this post

    Hello Ralf,

    Thanks for writing.
    Yes it is possible. You just have to change the default control template of RadHubTile. It uses a ContentPresenter internally and you can't force a content presenter to wrap text. If you change it with a text block you will be able to wrap the text.

    Please write again if you have more questions.

    Regards,
    Victor
    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.

     
  3. DevCraft banner
  4. Ralf
    Ralf avatar
    3 posts
    Member since:
    May 2013

    Posted 11 Apr 2014 in reply to Victor Link to this post

    Thanks for the reply Victor and for anyone wondering this is how I solved it:

    <!--Before edit-->
    <ContentControl x:Name="PART_Title" Content="{TemplateBinding Title}" Foreground="Black"
         FontSize="{StaticResource PhoneFontSizeMedium}" HorizontalAlignment="Left"
         Margin="{TemplateBinding Padding}" VerticalAlignment="Center"/>
     
    <!--After edit. The text in the Title is now wrapped-->
    <TextBlock x:Name="PART_Title" Text="{TemplateBinding Title}" TextWrapping="Wrap"
         Foreground="Black" FontSize="{StaticResource PhoneFontSizeMedium}"
         HorizontalAlignment="Left" Margin="{TemplateBinding Padding}"  VerticalAlignment="Top" />
  5. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 11 Apr 2014 Link to this post

    Hi Ralf,

    Great! If you have more question, feel free to write again.

    Regards,
    Victor
    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.

     
Back to Top
DevCraft banner