惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
Google DeepMind News
Google DeepMind News
G
Google Developers Blog
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
月光博客
月光博客
Jina AI
Jina AI
宝玉的分享
宝玉的分享
人人都是产品经理
人人都是产品经理
D
DataBreaches.Net
V
V2EX
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI
B
Blog
博客园 - 叶小钗
小众软件
小众软件
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed
A
About on SuperTechFans
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security Blog

博客园 - 阿齐

分享好用的截屏软件:SnagIt [转]如何在Windows Server 2012中安装.Net Framework 3.5? 屌丝笔记本玩Windows Phone 8开发(在Windows Server 2012中安装WP8 SDK) 在Ubuntu下的Firefox地址栏点击全选网页地址 Ubuntu下的Firefox差点让我崩溃 使用ICSharpCode.SharpZLib压缩/解压给定的数据 如何判断文本文件的编码方式? 使用Base64编码数据量变大33.4% 旧文一篇:7年项目总结 在.Net中将MailMessage保存为本地eml文件 创业之三要素 让MSN Messager(Windows Live Messager)重回托盘 创业的Idea是怎样产生的? 我的恩师白玉玺先生-----转自北京崇文汇通武术网站,作者:柳宗林 记录一把,两个截取HTTP请求的工具 标记一下:两个免费的SVN服务 需要使用计算器才能做的投资,通常都不是好投资 解决“A problem has been encountered while loading the setup components. Canceling setup.”的问题 己丑年正月十九北京随想
2013年1月18日 星期五 如何修改Panorama控件的Title
阿齐 · 2013-01-18 · via 博客园 - 阿齐

2013年1月18日 星期五 21:52:42     晴

我们建立一个新的Panorama类型的项目,其title是中文默认会是下面这个样子:大得出奇,很是不爽。如下图

我们可以把字体弄小些,并加上图标,如下:

<controls:Panorama>

            <controls:Panorama.Title>

                <StackPanel Orientation="Horizontal"  Margin="0,80,0,0">

                    <Image Source="/Assets/Images/ApplicationTitle.png" Margin="2,0,0,0" />

                    <TextBlock Text="我的应用程序" Margin="6,0,0,0"  FontSize="40" Height="60"></TextBlock>

                </StackPanel>

            </controls:Panorama.Title>

...

运行结果如下:

如果需要数据绑定,我们还可以使用数据模板:

<controls:Panorama.TitleTemplate>
                <DataTemplate>
                       <TextBlock Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}"  FontSize="40" Margin="0,80,0,0" Height="60"></TextBlock>
                </DataTemplate>
            </controls:Panorama.TitleTemplate>