【问题标题】:Pivot Header Template Issue Windows Universal C# XAML透视表头模板问题 Windows 通用 C# XAML
【发布时间】:2015-08-02 14:03:03
【问题描述】:

我看不到我的 PivotItem,它是不可见的,但绑定是正确的:

我在 App.xaml 中的模板:

  <DataTemplate x:Key="GoldStyle">
        <ContentPresenter>
            <TextBlock Text="{Binding}" FontFamily="Segoe Script" Foreground="Gold" FontSize="10"  Margin="0,70,0,0" />
        </ContentPresenter>
    </DataTemplate>

我的支点:

<Pivot HeaderTemplate="{StaticResource GoldStyle}">
        <PivotItem Header="Public Profile"  >
            <Grid>
                <TextBlock Text="-Set your Steam Profile to Public (Steam Settings)" FontFamily="Segoe Script" TextWrapping="Wrap" Foreground="WhiteSmoke"></TextBlock>
            </Grid>
        </PivotItem>
        <PivotItem Header="Features">
            <TextBlock FontFamily="Segoe Script" Text="-Calculate Price" Foreground="WhiteSmoke"></TextBlock>
        </PivotItem>

我做错了什么?

【问题讨论】:

    标签: c# xaml binding pivot


    【解决方案1】:

    乍一看,我认为这很奇怪,但唯一的问题是在 ContentPresenter 的 TextBlock 中,您将 Margin="0,70,0,0" 替换为 Margin="0,0,0, 0"。

    其他的都是对的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-07-27
      • 1970-01-01
      • 2011-09-18
      • 1970-01-01
      • 1970-01-01
      • 2013-06-08
      • 2011-09-08
      • 2017-02-14
      相关资源
      最近更新 更多