更改 PanoramaItem 的字体大小(Windows Phone)

发布于 2024-11-30 17:52:09 字数 421 浏览 3 评论 0原文

我正在尝试更改 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

若沐 2024-12-07 17:52:09

尝试设置 Panorama.HeaderTemplate 而不是 TitleTemplate

第一次尝试设置样式时,通常有助于在 Expression Blend 中打开控件,这样可以轻松查看所有控件涉及的不同模板及其默认值。

Try setting Panorama.HeaderTemplate instead of TitleTemplate

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文