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

Wrap text in RadHubTile

3 Answers 52 Views
HubTile
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ralf
Top achievements
Rank 1
Ralf asked on 07 Apr 2014, 11:26 AM
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?

3 Answers, 1 is accepted

Sort by
0
Accepted
Victor
Telerik team
answered on 10 Apr 2014, 10:30 AM
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.

 
0
Ralf
Top achievements
Rank 1
answered on 11 Apr 2014, 07:11 AM
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" />
0
Victor
Telerik team
answered on 11 Apr 2014, 07:26 AM
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.

 
Tags
HubTile
Asked by
Ralf
Top achievements
Rank 1
Answers by
Victor
Telerik team
Ralf
Top achievements
Rank 1
Share this question
or