更改 PanoramaItem 的字体大小(Windows Phone)
我正在尝试更改 PanoramaItem 标题的大小,但它不起作用。我尝试了 FontSize 属性,但它没有任何作用。我可以使用以下代码更改全景标题的字体大小:
<controls:Panorama.TitleTemplate>
<DataTemplate>
<TextBlock Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" FontSize="100" Margin="0,50,0,0" />
</DataTemplate>
</controls:Panorama.TitleTemplate>
I am trying to change the size of the PanoramaItem's title, but it doesnt work. I tried the FontSize attribute, but it does nothing. I could change the font size of the Panorama's title using this code:
<controls:Panorama.TitleTemplate>
<DataTemplate>
<TextBlock Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" FontSize="100" Margin="0,50,0,0" />
</DataTemplate>
</controls:Panorama.TitleTemplate>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试设置
Panorama.HeaderTemplate
而不是TitleTemplate
第一次尝试设置样式时,通常有助于在 Expression Blend 中打开控件,这样可以轻松查看所有控件涉及的不同模板及其默认值。
Try setting
Panorama.HeaderTemplate
instead ofTitleTemplate
It usually helps to open controls in Expression Blend when trying to style them for the first time, It makes it very easy to see all the different templates involved and their default values.