Skip to content

Problem with the header style in Pivot? #10765

@Linjie123

Description

@Linjie123

Describe the bug

Setting the header style globally does not display properly, only a single header per PiovtItem is OK

<Pivot.Resources>
    <Style TargetType="PivotItem">
        <Setter Property="Header">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock Style="{StaticResource BodyStrongTextBlockStyle}" Text="{Binding}" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</Pivot.Resources>

<PivotItem>
    <PivotItem.Header>
        <TextBlock Style="{StaticResource BodyStrongTextBlockStyle}" Text="General Settings" />
    </PivotItem.Header>
    <ScrollViewer>

。。。。

Steps to reproduce the bug

1

Expected behavior

No response

Screenshots

Image

NuGet package version

Windows App SDK 1.7.3: 1.7.250606001

Packaging type

Packaged (MSIX), Unpackaged

Windows version

Windows 11 version 24H2 (26100, June 2025 Update)

IDE

Visual Studio 2022

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageIssue needs to be triaged by the area owners

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions