windows-phone-7 – 如何为枢轴项目标题添加图像
发布时间:2020-12-13 23:22:32 所属栏目:Windows 来源:网络整理
导读:我正在开发一个简单的应用程序来学习wp7中的枢轴控制. 我们可以添加枢轴项目的图像而不是标题中的文本(波纹管图像中的红色标记区域). 是否可以添加图片,请建议我 我的xaml代码是: Grid x:Name="LayoutRoot" Background="Transparent" !--Pivot Control-- co
我正在开发一个简单的应用程序来学习wp7中的枢轴控制.
我们可以添加枢轴项目的图像而不是标题中的文本(波纹管图像中的红色标记区域). 是否可以添加图片,请建议我 我的xaml代码是: <Grid x:Name="LayoutRoot" Background="Transparent"> <!--Pivot Control--> <controls:Pivot Title="MY APPLICATION" Name="mainPivot"> <!--Pivot item one--> <controls:PivotItem Header="item1"> <Grid> <Image Source="/SchoolList;component/Gallery/child.jpg"/> </Grid> </controls:PivotItem> <!--Pivot item two--> <controls:PivotItem Header="item2"> <Grid> <Image Source="/SchoolList;component/Gallery/class.jpg"/> </Grid> </controls:PivotItem> </controls:Pivot> </Grid> 提前致谢
使用这个提示:
<phone:Pivot> <phone:Pivot.HeaderTemplate> <DataTemplate> <Image Source="{Binding}" /> // important </DataTemplate> </phone:Pivot.HeaderTemplate> </phone:Pivot> 然后将您的Pivot项标题设置为 <phone:PivotItem Header="path-to-image" > (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- raspberry-pi – 如何在Windows上构建接线Pi
- windows – 如何远程重启挂起的服务器
- windows – 从ReplaceFile重现ERROR_UNABLE_TO_MOVE_REPLAC
- windows – 删除超过(x)天的文件?
- 分析 – Windows脚本主机代码是否有Profiler?
- WPF:自定义窗口,标准最小/最大/关闭按钮
- windows – 我在使用远程桌面时是否在看控制台?
- windows-server-2012 – 无法在Server 2012上安装SQL Serve
- 确定Windows进程是否具有创建符号链接的权限
- 使用Windows 8 pro作为我的开发机器
推荐文章
站长推荐
热点阅读