Search code examples
windows-phone-7controltemplatepanorama-control

How is/can the WP7 Office Hub panorama header markup be created?


WP7 Office hub panorama header looks like this:

office hub look

What is it?

  • one solid image
  • two images (one for logo, one for "microsoft Office")
  • all vector elements

The answer interests me only because I know how to achieve this only in the first two cases.

Basically I need to create a TextBlock in PanoramaHeaderTemplate, that would be like this:

<TextBlock Foreground="Black"><Run Text="smallBold" FontWeight="Bold"/><Run Text="Normal"></TextBlock>

So the resulting panorama should have a look:

panorama header look

If I use FontWeight directive in the PanoramaHeaderTemplate - it for some reason has no effect.

If I use PanoramaTitleTemplate, I get the controllable text weight, but I have a panorama header element appear for some reason, that only displays a x:Key element name of the PanoramaItem, that results in an appearance of a header I don't need at all. This happens even if I don't define the panorama header.

So which is the correct way to achieve the look on the Panorama "upper element", whether it is Title or Header, that is shown on the smallBold.Normal figure?


Solution

  • I don't know what Office uses but it's irrelevant because, as a native app, it wasn't created with Silverlight.

    You can create the same effect by changing the Panorama.TitleTemplate to contain whatever you want (TextBlocks, images, etc.). You may also have to adjust the defautl Style applied to the template to set a Height and Width for the PanningTitleLayer.