HandyOrg / HandyOrg/HandyControl

TabItem custom header foreground color does not change dynamically

Open
#1,220 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
7.2k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

TabItem custom header foreground does not change dynamically.

Steps to reproduce the bug
<TabControl Style="{StaticResource TabControlCapsuleSolid}">
    <TabItem>
        <TabItem.Header>
            <TextBlock Text="MyHeader" />
        </TabItem.Header>
    </TabItem>
</TabControl>
Expected behavior

The effect should be equivalent to this:

<TabControl Header="MyHeader"
    Style="{StaticResource TabControlCapsuleSolid}">

</TabControl>
Screenshots

The foreground color of the selected header should be white:

微信截图_20220723221633

NuGet package version

HandyControls (Custom version) 3.4.0

IDE

Visual Studio 2022

Framework type

.Net 6.0

Windows version

Windows 11 (22000)

Additional context

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the XAML example in Visual Studio 2022 on .NET 6 and compare it with the equivalent TabControl Header example. Inspect the TabControlCapsuleSolid style and verify that a custom TabItem.Header TextBlock updates its foreground when the tab is selected; done means both header forms show the expected selected-header color.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.