microsoft / microsoft/microsoft-ui-xaml

TabView TearOutTabs: Event args NewWindowID property's value is zero

Open
#10,156 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

### Describe the bug

In the event handler for the `TabTearOutWindowRequested` event you return the AppWindow.ID of the new window by setting the event args property `NewWindowID`.

However although the event args type for the other three events `TabTearOutRequested`, `ExternalTornOutTabsDropping` and `ExternalTornOutTabsDropped` all contain a `NewWindowID` property, it's value is always zero (the default for the WindowID struct).

Repro project: [TearOutTabs.zip](https://github.com/user-attachments/files/17715590/TearOutTabs.zip)

### Steps to reproduce the bug

.

### Expected behavior

I would have expected the `NewWindowID` property to be the id of the new tear out window.

### Screenshots

_No response_

### NuGet package version

WinUI 3 - Windows App SDK 1.6.1: 1.6.240923002

### Windows version

Windows 11 (22H2): Build 22621

### 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 tear-out event definitions and the attached TearOutTabs.zip reproduction. Compare NewWindowID handling for TabTearOutRequested, ExternalTornOutTabsDropping, ExternalTornOutTabsDropped, and TabTearOutWindowRequested. Done means the affected event args report the new tear-out window's ID rather than the default zero value.

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.