Skip to content

[TabView] TabViewItem retains selected color when reordering tab. #10478

@hihihaha2025

Description

@hihihaha2025

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

Steps to reproduce the bug

  1. Add the following code to TabView
    <TabView> <TabView.Resources> <ResourceDictionary> <ResourceDictionary.ThemeDictionaries> <ResourceDictionary x:Key="Light"> <SolidColorBrush x:Key="TabViewBackground" Color="{ThemeResource SystemAccentColorLight2}"/> </ResourceDictionary> <ResourceDictionary x:Key="Dark"> <SolidColorBrush x:Key="TabViewBackground" Color="{ThemeResource SystemAccentColorDark2}"/> </ResourceDictionary> </ResourceDictionary.ThemeDictionaries> </ResourceDictionary> </TabView.Resources> </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

Screenshots

Image

Image

Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions