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

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
D
Docker
Vercel News
Vercel News
IT之家
IT之家
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
腾讯CDC
Google DeepMind News
Google DeepMind News
I
InfoQ
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
The GitHub Blog
The GitHub Blog
博客园 - Franky
The Cloudflare Blog
A
About on SuperTechFans
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
T
Tenable Blog
P
Proofpoint News Feed
Recorded Future
Recorded Future
Security Latest
Security Latest
H
Hackread – Cybersecurity News, Data Breaches, AI and More
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 聂微东
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google Online Security Blog
Google Online Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Simon Willison's Weblog
Simon Willison's Weblog
The Last Watchdog
The Last Watchdog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
U
Unit 42
The Hacker News
The Hacker News
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
F
Full Disclosure
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
Project Zero
Project Zero

博客园 - 黎波

精至手机药典Windows Phone 7版 [WP7]CheckBox 文字自动换行 Windows Phone 7 系统主题颜色RGB和Hex值 [WP7]MD5加密字符串 [iOS]MD5加密字符串 [WP7]关于 ListBox 的 SelectionChanged 事件 [Android]MD5加密字符串 [Android]获取设备IP地址 如何检查对象的类型[iOS/Android/Windows Phone] 精至手机药典iPhone版 [iOS]NSString常用代码 目标身高iPhone版 目标身高Android版 [iOS]让Xcode 4.2生成的app支持老的iOS设备(armv6) [iOS]升级到 Xcode 4.1 后 sqlite3.h 引起 Expected declaration specifiers before 'interface' 错误 [转载]用手机玩转汽车 体验安吉星手机应用程序 [iOS]Xcode 4.1 bug: Text Field 引起 EXC_BAD_ACCESS 错误的解决 精至手机药典Android版 [Android]使用ProGuard遇到“conversion to Dalvik format failed with error 1”错误的解决办法
[WP7]修改 Pivot 控件的 PivotItem 标题字体大小
黎波 · 2012-07-03 · via 博客园 - 黎波

PivotItem 的标题(Header)文本字体比较大,有时候需要配合UI设计修改字体大小。实现方法请看 XAML 实现代码:

<controls:Pivot Title="MY APPLICATION">
    <controls:PivotItem>
        <controls:PivotItem.Header>
            <TextBlock Text="first" FontSize="{StaticResource PhoneFontSizeExtraLarge}" />
        </controls:PivotItem.Header>

        <ListBox>...</ListBox>
    </controls:PivotItem>

    <controls:PivotItem Header="second"> ...</controls:PivotItem>
</controls:Pivot>

调整前和调整后对比:

 

除了用 XAML 代码实现,还可以通过 C# 代码实现:

public MainPage()
{
    InitializeComponent();

    pivotItem2.Header = new TextBlock { Text = "header 2", FontSize = 32 };
}

作者:黎波
博客:http://bobli.cnblogs.com/
日期:2012年7月3日