If you want to alter the template for a Windows Phone 7 pivot control’s header, the simplest way is as follows…
<controls:Pivot Title="Altered Styles"> <controls:Pivot.HeaderTemplate> <!-- This changes to look of the items headers --> <DataTemplate> <TextBlock Text="{Binding}" Foreground="Black"/> </DataTemplate> </controls:Pivot.HeaderTemplate> <controls:Pivot.TitleTemplate> <!-- This changes to look of the pivot overall title --> <DataTemplate> <TextBlock Text="{Binding}" Foreground="Black"/> </DataTemplate> </controls:Pivot.TitleTemplate> <controls:PivotItem Header="daily"> <Grid/> </controls:PivotItem> <controls:PivotItem Header="hourly"> <Grid/> </controls:PivotItem> </controls:Pivot>
Of course, all this example does is specifically set the colour used for the title and headers to black, but you can do (almost) whatever you like in those templates. Want to add an image as a bullet? Go for it.
<controls:Pivot.HeaderTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <Image Height="48" Width="48" Source="/MyBulletImage.png" /> <TextBlock Text="{Binding}" Foreground="Black"/> </StackPanel> </DataTemplate> </controls:Pivot.HeaderTemplate>