dotnet / dotnet/wpf

Data-bound TabControls don't select an initial tab item

Open
#3,310 3 comments 0 reactions 1 assignee Claimed by @anjaligupta-dev View on GitHub
Investigate
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

* .NET Core Version: 3.1.302, 3.1.6
* Windows version: Windows 10 1903
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes

**Problem description:**

Tab controls with data-bound `ItemsSource` don't select an initial tab item, if the tab control is visible at program start. If the tab control becomes visible later, it properly selects the first tab item. This can be verified by moving the "Dummy" tab item from the repro sample before the "Repro" tab item.

**Actual behavior:**

![2020-08-06_13-20-01](https://user-images.githubusercontent.com/11393003/89526116-8ced4a80-d7e7-11ea-8799-e0d88593a6c7.png)

**Expected behavior:**

The inner tab control should automatically select the first item.

**Minimal repro:**

[Tabs.zip](https://github.com/dotnet/wpf/files/5034480/Tabs.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.