Xaml 为什么';覆盖PivotHeaderItem控件的默认样式是否有效?

Xaml 为什么';覆盖PivotHeaderItem控件的默认样式是否有效?,xaml,windows-phone-8,Xaml,Windows Phone 8,我已尝试为PivotHeaderItem创建全局样式,但没有得到应用。我知道我可以为Pivot创建全局样式,并设置HeaderTemplate属性,但现在我很好奇,当默认设置为创建PivotHeaderItem时,为什么我的全局样式没有被选中 在App.xaml中,我得到了以下代码片段: <Application.Resources> <ResourceDictionary> <Style TargetType="Primitives:Piv

我已尝试为
PivotHeaderItem
创建全局样式,但没有得到应用。我知道我可以为
Pivot
创建全局样式,并设置
HeaderTemplate
属性,但现在我很好奇,当默认设置为创建
PivotHeaderItem
时,为什么我的全局样式没有被选中

在App.xaml中,我得到了以下代码片段:

<Application.Resources>
    <ResourceDictionary>
        <Style TargetType="Primitives:PivotHeaderItem">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Padding" Value="21,0,1,0"/>
            <Setter Property="Margin" Value="0"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Primitives:PivotHeaderItem">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="SelectionStates">
                                    <VisualState x:Name="Unselected"/>
                                    <VisualState x:Name="Selected">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <TextBlock Foreground="Green" Text="{Binding}" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </ResourceDictionary>
</Application.Resources>


您如何尝试将其作为默认样式应用。我将对其进行编辑以使其明确。