This project is read-only.

Change app title font size

Jul 20, 2013 at 5:13 PM
Is there a way to change the app title font size?

I tried the following but it doesn't seem to work

<Style x:Key="AboutPivotStyle"
       TargetType="controls:Pivot">
    <Setter Property="FontSize"
            Value="{StaticResource PhoneFontSizeSmall}" />
Jul 21, 2013 at 10:59 AM
Hi,

setting the font properties that way does not apply to the title element. Instead, you need to change the title template. To achieve what you're trying to do, you would define the style as follows:
<Style x:Key="AboutPivotStyle"
        TargetType="controls:Pivot">
    <Setter Property="TitleTemplate">
        <Setter.Value>
            <DataTemplate>
                <TextBlock Style="{StaticResource PhoneTextSmallStyle}" Text="{Binding}" />
            </DataTemplate>
        </Setter.Value>
    </Setter>
As you can see, instead of manipulating the font properties I'm explicitly setting the style for the title. The data context is the actual upper case application title, which is why the Text property of the template's text block is simply set to {Binding}.

-Peter
Jul 21, 2013 at 11:45 AM
I see. that makes perfect sense. Thank you!

And great work with this component!