I’m developing a Windows Phone 7 application and I’m trying to change the look of the Title element.
All over the internet they show code similar to this:
<controls:Panorama>
<controls:Panorama.Title>
<StackPanel Orientation="Horizontal" Margins="0,80,0,0">
<Image Source="/myimage.png"/>
<TextBlock Text="my title"/>
</StackPanel>
</controls:Panorama.Title>
</controls:Panorama>
But when I run it, it just comes up with these errors
The property ‘Title’ does not exist on the type ‘Grid’ in the XML namespace ‘clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls’. c:\users\lukecou\documents\visual studio 2010\Projects\PanoramaApp2\PanoramaApp2\Homepage.xaml 22 10 PanoramaApp2
and
The attachable property ‘Title’ was not found in type ‘Panorama’. c:\users\lukecou\documents\visual studio 2010\Projects\PanoramaApp2\PanoramaApp2\Homepage.xaml 22 10 PanoramaApp2
How come the Title element exists for everyone else and not for me?
How do I gain access to it?
Its noteworthy that the error says “The property ‘Title’ does not exist on the type ‘Grid’ ” why Grid and not Panorama? Its a clue to something else wrong with your real Xaml