WP8: reduce the size of the header of the summary page?

I need to reduce the title text of item1 on the summary page. But, I do not know how to do this. Is there a way to reduce the font size?

XAML code;

 <phone:PivotItem Header="item1"> <Grid/> </phone:PivotItem> 
+4
source share
3 answers

You can change the HeaderTemplate . Smth like this:

 <phone:Pivot.HeaderTemplate> <DataTemplate> <Grid> <TextBlock Text="{Binding}" FontSize="40" /> </Grid> </DataTemplate> </phone:Pivot.HeaderTemplate> 
+9
source

You cannot change the font size in PivotItem. Instead, you can create a template in which you can add a TextBlock and consider it a title. Please find a sample here.

 <controls:Pivot Title="whatever" Name="pivot"> <controls:PivotItem Margin="11,28,13,0" > <controls:PivotItem.Header> <Grid> <TextBlock Name="FirstPivot" FontSize="31" Text="FirstPivot" /> </Grid> </controls:PivotItem.Header> <Grid> <!-- content --> </Grid> </controls:Pivot> 
+1
source

In Windows Phone 8, remember to change the "controls" to "phone."

 <phone:Pivot Title="whatever" Name="pivot"> <phone:PivotItem Margin="11,28,13,0" > <phone:PivotItem.Header> <Grid> <TextBlock Name="FirstPivot" FontSize="31" Text="FirstPivot" /> </Grid> </phone:PivotItem.Header> <Grid> <!-- content --> </Grid> </phone:Pivot> 
+1
source

Source: https://habr.com/ru/post/1499112/


All Articles