Reputation: 1677
I need to reduce the header text item1
in pivot page. But, i dunno how to do. Is there anyway to reduce this font size ?
XAML Code;
<phone:PivotItem Header="item1">
<Grid/>
</phone:PivotItem>
Upvotes: 4
Views: 4124
Reputation: 311
On 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>
Upvotes: 1
Reputation: 1128
You can change HeaderTemplate
. Smth like this:
<phone:Pivot.HeaderTemplate>
<DataTemplate>
<Grid>
<TextBlock Text="{Binding}" FontSize="40" />
</Grid>
</DataTemplate>
</phone:Pivot.HeaderTemplate>
Upvotes: 9
Reputation: 126
You cannot change the font size in PivotItem. Instead you can create a Template where you can add a TextBlock and consider it as a header. Please find the 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>
Upvotes: 1