在 wp7 中将图像设置为全景页面的全景标题 [英] Setting image as Panorama Title for Panorama page in wp7

查看:19
本文介绍了在 wp7 中将图像设置为全景页面的全景标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为全景页面的标题设置图像,我们可以这样做吗?实际上,我已经使用 TitleTemplate 完成了此操作,但它不起作用.. 你能指导我如何将图像设置为全景页面标题.

I need to set the Image for Panorama Page's Title, Can we able to do this ? Actually I have done this using TitleTemplate but it is not working.. can you guide me how to set the Image as Panorama Page Title.

代码是

<controls:Panorama Background="{Binding PanoramaBackground}">
  <controls:Panorama.TitleTemplate>
    <DataTemplate>
      <StackPanel>
        <Image x:Name="HeaderImage" Source="/Resources/header_logo.png" />
      </StackPanel>
    </DataTemplate>
  </controls:Panorama.TitleTemplate> 
</controls:Panorama>

但这不起作用..

谢谢和问候,

餐具

推荐答案

要完成这项工作,您需要实际拥有一些数据,以便使用您的模板.
由于您不想在模板中使用任何传递的值,您只需将 Title 设置为空字符串即可使其工作.

To make this work you need to actually have some data so that your template is used.
As you don't want to use any passed value in your template you can get this to work by simply setting the Title to an empty string.

<controls:Panorama Title="">

这篇关于在 wp7 中将图像设置为全景页面的全景标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆