Friday, March 15, 2013

Solution: Modify Pivot title in Windows Phone 7

To modify Pivot title in WP7, replace Title attribute with <Title> tag.

For example, to make Pivot control title red, change original XAML code

<Grid x:Name="LayoutRoot" Background="Transparent">

        <controls:Pivot Title="MY APPLICATION">
            
            <controls:PivotItem Header="Main">
            ...

to this:

    <Grid x:Name="LayoutRoot" Background="Transparent">

        <controls:Pivot>

            <controls:Pivot.Title>
                <TextBlock Text="MY APPLICATION" Foreground="Red" />
            </controls:Pivot.Title>
            
            <controls:PivotItem Header="Main">
            ...

No comments:

Post a Comment