How to change the font size of title property of a

2019-08-30 06:23发布

问题:

i am using the hubtile control from the Microsoft.Phone.Controls.Toolkit the xaml code for it is

<toolkit:HubTile x:Name="hub" Margin="12,12,0,0"                                             
                         Title="{Binding Title}"                        
                         Message="{Binding Message}"
                         Source="{Binding Image}"
                         GroupTag="BindingHubTile" Tap="HubTile_Tap_1">
                                </toolkit:HubTile>

how to change the font size of the title property so that the whole title fits in?

回答1:

You can't do this. One way is find HubTile class and change default font size.



回答2:

Download "Auto Scaling TextBlock for Silverlight" class and include it in your project.

Modify the ControlTemplate of the HubTile control to use the AutoScalingTextBlock instead of just TextBlock for title.