microsoft / microsoft/microsoft-ui-xaml

[TabView] TabViewItem retains selected color when reordering tab.

Open
#10,478 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-TabView bug
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

When reordering a tab and then selecting a different tab, the background color of the previously selected tab is still retained.
![Image](https://github.com/user-attachments/assets/57ddb640-e846-4ca2-97b5-bc5237ae5155)

### Steps to reproduce the bug

1. Add the following code to TabView
`












`
2. Add some tab items to TabView
3. Select a tab (e.g. "Tab 4"), then reorder this tab.
4. Click on another tab (e.g. "Tab 3")
5. The background color of the previously selected Tab remains.

### Expected behavior

When performing step 4, the result is as shown:
![Image](https://github.com/user-attachments/assets/fe0debfd-7f1e-4024-92bb-9d52459752de)

### Screenshots

![Image](https://github.com/user-attachments/assets/57ddb640-e846-4ca2-97b5-bc5237ae5155)

![Image](https://github.com/user-attachments/assets/87346dab-23b0-4aea-8b80-e87cb10f3ae9)

![Image](https://github.com/user-attachments/assets/409f97b8-4ee0-441b-8ca0-9d683493413c)

### NuGet package version

WinUI 3 - Windows App SDK 1.7.0: 1.7.250310001

### Windows version

Windows 10 (20H2): Build 19042, Windows 10 (21H2): Build 19044

### Additional context

_No response_

Contributor guide

Open the contributing guide

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 with the TabView control and its tab-reordering and selection behavior; the issue names no source file or test. Reproduce the sequence with the supplied TabView resources and several tabs, then verify that selecting another tab no longer leaves the previously selected tab's background color.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.